AutoComplete Remove Selected Item #1194
Unanswered
mppk-Hammad
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Good day,
I'm encountering an issue when attempting to remove an item from the Autocomplete component. Specifically, clicking the "X" (clear) icon results in the following error:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
this is what I have written:
@code{
private void OnUserTypeChanged(UserType selectedUserType)
{
try
{
if (selectedUserType is null)
return;
Console.WriteLine($"'{selectedUserType?.Name}' selected.");
}
catch (Exception ex)
{
Console.WriteLine($"Error in OnUserTypeChanged: {ex.Message}");
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions