[Feature] TokenizingTextBox - Make TokenItemAdding event to be invoked even if the adding object is not a string to allow pre-check and cancellation #529
Labels
feature request 📬
A request for new changes to improve functionality
Describe the problem
Currently,
TokenizingTextBox
does not fireTokenItemAdding
event when thedata
parameter inAddTokenAsync(object data)
is not astring
.So when the user selects the already added item from
SuggestedItemsSource
, onlyQuerySubmitted
event is invoked and I cannot prevent the duplicate item adding.Thus, allowing
TokenItemAdding
to be invoked even if thedata
parameter is not astring
would allow me to prevent duplicate items adding by checking the adding object and cancelling the event.Describe the solution
Modify
AddTokenAsync(object data)
Alternatives
TokenizingTextBoxQuerySubmittedEventArgs
class and either removesealed
fromAutoSuggestBoxQuerySubmittedEventArgs
and derive from it like this:Or just create a similar class with additional
Cancel
property:TokenizingTextBoxQuerySubmitted
event inTokenizingTextBox.Events.cs
RaiseQuerySubmitted
AutoSuggestBox_QuerySubmitted
Additional info
No response
Help us help you
None
The text was updated successfully, but these errors were encountered: