Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadzenDropDown selection by spacebar #2011

Closed
LysakVitaliy opened this issue Mar 1, 2025 · 2 comments
Closed

RadzenDropDown selection by spacebar #2011

LysakVitaliy opened this issue Mar 1, 2025 · 2 comments

Comments

@LysakVitaliy
Copy link

RadzenDropDown, the ability to select an option with a spacebar.

To Reproduce:

  1. Set Multiple and AllowFiltering to true.
  2. Try to search some.
  3. When a result appears move down by keyboard (arrow-down).

Image

  1. Try to choose an option by spacebar.
  2. Space will be added to the search keyword and the result will be empty.

Image

Expected:
Select an option by spacebar and if you type a character or digit (etc) it corrects the search word.

Here is an example of the new behavior I am trying to describe:

@Anspitzen
Copy link

Select with the ENTER key instead of SPACE does work though.
That's also how it is documented on the Keyboard Navigation for DropDown

But I do agree that it is somewhat unusal. Most other apps do use the SPACE for select when there is a Checkbox, even the RadzenCheckBox does use the SPACE there. But then the DatePicker and the single DropDown do make sense with the ENTER for selecting from the popup, so it doesn't make that much sense to change it based on single/multiple mode.
Additional to consider: The ENTER also gets caught by the DropDown (either to open it or select any item) and will not trigger the RadzenTemplateForm it is maybe embedded in.

@srielango
Copy link

@Anspitzen

I understand your point about using Enter as the default for selection, but many apps and even RadzenCheckBox use Space for selection in multi-select scenarios.

To maintain backward compatibility and avoid breaking forms that rely on Enter, I have implemented a fix that:

  • Supports Space for selecting items in multi-select mode.
  • Prevents page scrolling when Space is used.
  • Does not interfere with Enter behavior in forms.

Would you be open to a PR with this fix? I’ve already tested it and ensured that existing behavior remains intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants