feat: avoid adding new item when there is not selection in ListBox.
This commit is contained in:
@@ -1564,10 +1564,7 @@ public partial class MultiAutoCompleteBox : TemplatedControl, IInnerContentContr
|
||||
/// <param name="e">The selection changed event data.</param>
|
||||
private void OnAdapterSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
// TODO set selection.
|
||||
// SetCurrentValue(SelectedItemProperty, _adapter!.SelectedItem);
|
||||
SelectedItems?.Add(_adapter?.SelectedItem);
|
||||
// UpdateTextValue(null);
|
||||
}
|
||||
|
||||
//TODO Check UpdateTextCompletion
|
||||
|
||||
@@ -258,6 +258,7 @@ public class MultiAutoCompleteSelectionAdapter : ISelectionAdapter
|
||||
/// </summary>
|
||||
internal void OnCommit()
|
||||
{
|
||||
if (_previewSelectedItem is null) return;
|
||||
SelectedItem = _previewSelectedItem;
|
||||
SelectionChanged?.Invoke(this,
|
||||
new SelectionChangedEventArgs(
|
||||
|
||||
Reference in New Issue
Block a user