-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting selectedItem property during build() is broken in version 0.4.6 #56
Comments
Do you mean setdefault selected item not working anymore ? |
@salim-lachdhaf yes. selectedItem set initially during build() is not working in 0.4.6 anymore. |
it working just fine, please re check |
@salim-lachdhaf I’ve checked multiple times. Not working. Will prepare demo project, my code is not that simple, probably combination of other used properties affects it. |
That is could be. Thank you |
@salim-lachdhaf I'm testing on beta channel, Flutter 1.23.0-18.1.pre |
it's not a bug. in fact it was a bug in 0.4.5.
which cause a lot of problems for users, for example losing selectedItem (back to default one) in keyboard popup, change focus .... Now in 0.4.6 i removed the bug (function that re set default selected value) and i added a proper way to set the selected value programmatically using GlobalKey as showed in the example of the plugin. thank you for reporting your notice, Waiting for your feedback after updating your app based on 0.4.6 changes ;) Edit: i can do something like :
and your problem will be solved either in the version 0.4.6. but i prevent the uses of unnecessary |
@salim-lachdhaf Thanks for explanation, I agree that setState() call is much worse than using _ddKey.currentState.changeSelectedItem(). After I've changed my code to using keys it's all works. The only complain - please next time on pub.dev mark such changes as BREAKING, because it was absolutely not obvious that refactoring is needed all over my project, and actually such refactoring took some time, not as easy as 5 minutes. |
In 0.4.5 it is working fine, updating dependency to 0.4.6 - stops working, returning back to 0.4.5 - working again.
The text was updated successfully, but these errors were encountered: