Skip to content

Commit

Permalink
Removes last entry from multi-select when backspace pressed (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissainty authored Sep 24, 2020
1 parent 5b172c2 commit 93d9145
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Blazored.Typeahead/BlazoredTypeahead.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ private async Task HandleKeyup(KeyboardEventArgs args)
{
await SelectResult(Suggestions[SelectedIndex]);
}
else if (IsMultiselect && args.Key == "Backspace")
{
await RemoveValue(Values.Last());
}
}

private async Task HandleInputFocus()
Expand Down

0 comments on commit 93d9145

Please sign in to comment.