maheshj01 / searchfield

A highly customizable simple and easy to use flutter Widget to add a searchfield to your Flutter Application.This Widget allows you to search and select from list of suggestions.
MIT License
84 stars 63 forks source link

An incorrect item was selected from the search results #159

Closed santhosh-g-tz closed 4 months ago

santhosh-g-tz commented 4 months ago

Describe the bug An incorrect item was selected from the search results

[v1.0.7] (https://pub.dev/packages/searchfield/changelog)

Screenshots

https://github.com/user-attachments/assets/f916c54a-fbde-40bc-990e-d51d6f2f1094

Code sample

Show code sample ```dart var countries = [ 'United States', 'Germany', 'Canada', 'United Kingdom', 'France', 'Italy', 'Spain', 'Australia', 'India', 'China', 'Japan', 'Brazil', 'South Africa', 'Mexico', 'Argentina', 'Russia', 'Indonesia', 'Turkey', 'Saudi Arabia', 'Nigeria', 'Egypt', ]; return SearchField( maxSuggestionsInViewPort:10, suggestions: countries .map( (e) => SearchFieldListItem( e, item: e, child: Padding( padding: const EdgeInsets.all(8.0), child: Text(e), ), ), ).toList(), );```
maheshj01 commented 4 months ago

Thanks for filing the issue, this shows we have a poor tests setup. I will try to get this fixed asap.

maheshj01 commented 4 months ago

Hi @santhosh-g-tz Can you please give this a try

add to pubspec.yaml

searchfield:
    git:
      url: git://github.com/maheshj01/searchfield.git
      ref: hotfix-159
maheshj01 commented 4 months ago

@santhosh-g-tz released a new version v1.0.8