Open rodrigolangowski opened 4 years ago
Have you tried added adding keys to your parent stateful widget which holds the SeachableDropdown? Try it, that would do the trick for you. Good luck!
I dont know if what @kay14 meant it was to add a UniqueKey() for every place you use the SeachableDropdown but it makes the trick for me but still dont understand why. Any reason?
Any updates on this ?
Any solutions :(
I ended up writing my own dropdown search (Necessity is mother of inventions)
In my app, I made a series of dropdown in cascade. When I select an item, the next dropdown is automatically filled. For example, there are 10 items in the first dropdown, so I select the item 8. If I change the selection of the first dropdown, and so the second changes its values, now going to one that has 5 elements, we have the error RangeError (index): Invalid value: Not in range 0..4, including 7. Because the second list has still its index of the first selection. How do I reset the index of a SearchDropdown?