-
Notifications
You must be signed in to change notification settings - Fork 693
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
Editable combo box sets bound value to null when itemsource changes #9573
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you! Open similar issues:
Closed similar issues:
|
I am having a hard time understanding the repro steps. Could you share some code and xaml that demonstrates the issue? |
https://github.com/SoggyBottomBoy/EditableComboBoxBug |
Thanks. I can reproduce the issue. As you said, there are two issues here:
|
Yep but I think item 2 is somewhat solved by item 1. I would say an editable combox should be expected to retain the value if the ItemsSource is changed, if the developer does not want this behaviour then it should be an explicit opt in by handling ItemsSourceChanged or similar. |
Resolving as dupe of #10232 |
Describe the bug
I have an editable combo box which allows the user to select predefined items or set another item by typing in its name. The combox box ItemsSource is bound to a list of strings which is changed when action is taken by the user which changes the list of predefined strings. When the ItemsSources changes it appears that the SelectedItem is set to null. I am unable to re-type the same value, and clicking the drop down repopulates the value.
I'm pretty confused about what is going on...
Steps to reproduce the bug
Create 2 editable combo boxes.
Have one 1 combo box ItemsSource rely on the value of the other.
Enter a value like "1" in the combo box.
Change the value of the other combo box to trigger a changes of the items source
The value in the editable combo box is replaced with null and "1" can not be entered.
Expected behavior
For an editable combo box change the items source should not re-trigger the value bound to selected item or text to change.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: