DotNetKit.Wpf.AutoCompleteComboBox
DotNetKit.Wpf.AutoCompleteComboBox copied to clipboard
Item selection in ComboBox breaks if DisplayMemberPath and TextSearch.TextPath point to different properties
https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox/blob/39e1f0e2bfbf1f5dbc1bac1e5cf87e2f4d8a728d/DotNetKit.Wpf.AutoCompleteComboBox/Windows/Controls/AutoCompleteComboBox.xaml.cs#L173
text gets filled by resolving DisplayMemberPath and TextFromItem(SelectedItem) gets filled by resolving TextSearch.TextPath.
If these properties aren't set to the same/equivalent properties SelectedItem 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.
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.