Closed thatgim closed 1 year ago
Thanks for suggestion.
I tried to reproduce your situation (SelectedItem is unset) in the demo app but couldn't...: https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox/commit/08c474560c42d562ce835354529e1aa8736b49bf
It seems Text is filled by resolving TextPath
rather than DisplayPath
, as TextFromItem
is.
I would be glad if a reproduction code is given.
Closing since not reproduced. Feel free to reopen if someone want to discuss about this.
https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox/blob/39e1f0e2bfbf1f5dbc1bac1e5cf87e2f4d8a728d/DotNetKit.Wpf.AutoCompleteComboBox/Windows/Controls/AutoCompleteComboBox.xaml.cs#L173
text
gets filled by resolvingDisplayMemberPath
andTextFromItem(SelectedItem)
gets filled by resolvingTextSearch.TextPath
. If these properties aren't set to the same/equivalent propertiesSelectedItem
gets unset immediatly after selection.I tried removing
TextFromItem(SelectedItem) == text
and it fixed this problem and didn't introduce any new problem as far as I can tell.