Skip to content

Releases: maheshj01/searchfield

v1.2.0

30 Nov 16:58
Compare
Choose a tag to compare

What's Changed

  • [Breaking]: Handle selected Value on Client Side Issue: #191

Before

The package sets the selectedValue automatically inside the component, which leads to issues when navigating or selecting suggestions

SearchField(
    hint: 'Basic SearchField',
    dynamicHeight: true,
    maxSuggestionBoxHeight: 300,
    initialValue: SearchFieldListItem<String>('ABC'),
    suggestions: dynamicHeightSuggestion
        .map(SearchFieldListItem<String>.new)
        .toList(),
    suggestionState: Suggestion.expand,
),

After

Now the client should handle the selectedValue explicitly in the client code (consumer code) by using the onSuggestionTap callback. This approach simplifies the API and provides more accurate control over the internal state of the package.

var selectedValue = SearchFieldListItem<String>('ABC');

SearchField(
    hint: 'Basic SearchField',
    dynamicHeight: true,
    maxSuggestionBoxHeight: 300,
    // now the selectedValue is handled by the client
    onSuggestionTap: (SearchFieldListItem<String> item) {
        setState(() {
            selectedValue = item;
        });
    },
    selectedValue: selectedValue, // rename initialValue to selectedValue
    suggestions: dynamicHeightSuggestion
        .map(SearchFieldListItem<String>.new)
        .toList(),
    suggestionState: Suggestion.expand,
),
  • Fixes: Issue: #178, Issue: #155

  • Fixes: Issue: #151 Clarifies use of SuggestionAction and now defaults to SuggestionState.unfocus without having to use FocusNode on client side.

  • Fixes: Issue: #190 Keyboard navigation does not work after selecting a suggestion.

Huge thanks to all contributors and supporters.
Happy Thanksgiving! 🦃

  • add contextmenubuilder property by @maheshj01 in #189
  • [regression] Fix: Keyboard navigation does not work Issue: 183
  • [Breaking] Proposal to handle selectedValue on the client side by @maheshj01 in #194

Full Changelog: v1.1.7...v1.2.0

v1.1.6

26 Sep 16:05
Compare
Choose a tag to compare

Full Changelog: v1.1.5...v1.1.6

v1.1.5

25 Sep 17:01
Compare
Choose a tag to compare

Full Changelog: v1.1.4...v1.1.5

    • remove custom assertions for SearchInputDecoration properties

v1.1.4

24 Sep 18:10
Compare
Choose a tag to compare

v1.1.3

21 Sep 03:18
Compare
Choose a tag to compare
  • Fix SearchInputDecoration does not take any values Issue #176

Full Changelog: v1.1.2...v1.1.3

v1.1.2

20 Sep 16:59
Compare
Choose a tag to compare

What's new

  • add a SearchInputDecoration.copyWith constructor Issue #175
  • Fix Issue #174 Exception: RangeError (index): Index out of range: index must not be negative: -1
  • Fix Issue #165 Trigger onSubmit when a option is not selected.

Full Changelog: v1.1.1...v1.1.2

v1.0.9

05 Aug 23:27
70b870d
Compare
Choose a tag to compare

What's Changed

  • Select first suggestion by default on search by @maheshj01 in #149
  • Fix: SelectedItem scroll issue by @maheshj01 in #157
  • Add Support for Dynamic Height Item (Issue 67) by @bebaoboy in #154
  • fix: Searched suggestion cannot be set in searchfield by @maheshj01 in #161
  • Fix deactivate widget ancestor is unsafe during scroll to view by @maheshj01 in #163

New Contributors

Full Changelog: v1.0.5...v1.0.9

v1.0.5

05 Jun 13:23
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.4...v1.0.5

v1.0.3

28 May 22:14
9a10290
Compare
Choose a tag to compare

What's Changed

  • Update README.md by @maheshmnj in #134
  • OnSuggestionTapped returns SearchFieldItem when selected using keyboard by @maheshmnj in #139
  • Fix : Suggestions are not scrollable using the Scrollbar by @maheshmnj in #142

Full Changelog: v1.0.1...v1.0.3

v1.0.1

22 Mar 18:53
4f5fab5
Compare
Choose a tag to compare

What's Changed

  • Empty widget was not correctly displayed by @maheshmnj in #133

Full Changelog: v1.0.0...v1.0.1