icemanbsi / searchable_dropdown

MIT License
107 stars 164 forks source link

onChange Event not working properly #100

Open h-assefi opened 4 years ago

h-assefi commented 4 years ago

In my code when ever onChange is called the value is the same even if other options get selected. how to solve this problem ?

ignaciotcrespo commented 4 years ago

same issue here

ignaciotcrespo commented 4 years ago

@matheusfajardo created a PR (https://github.com/icemanbsi/searchable_dropdown/pull/84) to fix this, it is not merged yet. But you can use it in your project anyway

  searchable_dropdown:
      git:
        url: https://github.com/matheusfajardo/searchable_dropdown
        ref: master
VivianaGarces commented 4 years ago

@matheusfajardo created a PR (#84) to fix this, it is not merged yet. But you can use it in your project anyway

  searchable_dropdown:
      git:
        url: https://github.com/matheusfajardo/searchable_dropdown
        ref: master

Thank you so much, I was having the same issue and this solved it, hope that the fix can be contained next release

zafercuz commented 3 years ago

@matheusfajardo created a PR (#84) to fix this, it is not merged yet. But you can use it in your project anyway

  searchable_dropdown:
      git:
        url: https://github.com/matheusfajardo/searchable_dropdown
        ref: master

Thanks, had the same issue and your solution works. I was putting the search dropdown in a modal bottom sheet and this problem occurred, but it works if it's not in a modal bottom sheet, weird how it doesn't work. Hopefully the PR gets merged so we don't have to rely on an external link to another forked repo of this package.

Edit: It would seem I have an error once I fresh start up the app it produces an error as there will be a problem with cache. If anyone have this kind of error just do a

flutter clean
e: C:\flutter\flutter\.pub-cache\git\searchable_dropdown-bad9412c3c27d007ca901813138bbd7cfb4cc90b\android\src\main\kotlin\bsi\iceman\searchable_dropdown\SearchableDropdownPlugin.kt: (12, 14): Redeclaration: SearchableDropdownPlugin
e: C:\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\searchable_dropdown-1.1.3\android\src\main\kotlin\bsi\iceman\searchable_dropdown\SearchableDropdownPlugin.kt: (12, 14): Redeclaration: SearchableDropdownPlugin

I have this dependencies

#  searchable_dropdown: ^1.1.3
  searchable_dropdown:
    git:
      url: https://github.com/matheusfajardo/searchable_dropdown
      ref: master
hunterwilhelm commented 3 years ago

I am still having this problem even with the instructions above. I downgraded to 1.1.2 and it worked great. I hope that the fix can be contained next release


#  searchable_dropdown: ^1.1.3
  searchable_dropdown: '1.1.2'
MrJai commented 3 years ago

@matheusfajardo created a PR (#84) to fix this, it is not merged yet. But you can use it in your project anyway

  searchable_dropdown:
      git:
        url: https://github.com/matheusfajardo/searchable_dropdown
        ref: master

Thank you for sharing this, it really gave me a direction, but I am still facing this issue. I have a GeneralDialog that shows a small form (to select filters) those filters are lookups and I am using Searchable_dropdown package for that. But as these are also Dialogs when user clicks on done or close, the pop() method is called first and then onChanged() method is called.

I am still having this problem even with the instructions above. I downgraded to 1.1.2 and it worked great. I hope that the fix can be contained next release

#  searchable_dropdown: ^1.1.3
  searchable_dropdown: '1.1.2'

I tried this, and it worked in case of persisting the change, but it persists the change even after the dialog box is hidden, you cannot change the values from external sources (like clearing one or two filters without opening drop down again).

@icemanbsi can you please look into this ?

Thanks,