Open kvpt opened 1 year ago
Thank you.
However this PR breaks in the situation of #28. It can reproduce with Test
project by the following steps:
aa
) and suggestion list is shownAaron
)ItemsSource
)At this time, on main
(v1.6.0) the SelectedItem
is intact, on item-reset-fix
it's cleared.
The PR #28 caused a regression when using a CollectionView, when the CollectionView is bound the SelectionItem is reset.
Could you tell me how do you use CollectionView
to reproduce this? I'm trying to reproduce as in a commit 0c9fbcf (in vnext
branch) but not reproduced.
Recently I feel that providing CollectionViewSource
(#26) isn't right way perhaps. Instead, ask users to wrap ItemsSource
with CollectionViewSource
for each combobox instance. I would like to hear users thoughts.
Could you tell me how do you use CollectionView to reproduce this? I'm trying to reproduce as in a commit https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox/commit/0c9fbcfaa9e7f320e77a2b482d78d159f462b3fb (in vnext branch) but not reproduced.
Sure, in my app I do two things, I use a CollectionView (a ListCollectionView to be precise) directly and I set the Selected Value in the code after the creating of the collection view.
Here the two changes in the test project that reproduce my issue.
I can perhaps modify my app to use a CollectionViewSource instead of a CollectionView but I don't need this new level of indirection and this was working fine previously so I'm a bit reluctant to do it.
Recently I feel that providing CollectionViewSource (https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox/pull/26) isn't right way perhaps. Instead, ask users to wrap ItemsSource with CollectionViewSource for each combobox instance. I would like to hear users thoughts.
I don't really have an opinion if it need to be supported or not directly by the component, but it certainly will be difficult to handle all the combinations and possible use cases.
The PR #28 caused a regression when using a CollectionView, when the CollectionView is bound the SelectionItem is reset.
There is two cases to consider :