Releases: maheshj01/searchfield
v1.2.0
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 useFocusNode
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
Full Changelog: v1.1.5...v1.1.6
v1.1.5
Full Changelog: v1.1.4...v1.1.5
-
- remove custom assertions for
SearchInputDecoration
properties
- remove custom assertions for
v1.1.4
https://pub.dev/packages/searchfield/changelog
Full Changelog: v1.1.3...v1.1.4
v1.1.3
- Fix SearchInputDecoration does not take any values Issue #176
Full Changelog: v1.1.2...v1.1.3
v1.1.2
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
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
What's Changed
- Add Max Length and Text Counter Builder by @luckycreationsindia in #146
New Contributors
- @luckycreationsindia made their first contribution in #146
Full Changelog: v1.0.4...v1.0.5
v1.0.3
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