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

Simple Combo tries to set an item's header as selection target #14352

Open
jackofdiamond5 opened this issue Jun 10, 2024 · 1 comment · May be fixed by #14430, #14431 or #14432
Open

Simple Combo tries to set an item's header as selection target #14352

jackofdiamond5 opened this issue Jun 10, 2024 · 1 comment · May be fixed by #14430, #14431 or #14432
Assignees
Labels
🐛 bug Any issue that describes a bug simple-combo ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@jackofdiamond5
Copy link
Member

jackofdiamond5 commented Jun 10, 2024

Description

  • igniteui-angular version: latest
  • browser: n/a

Steps to reproduce

  1. Run the dev samples
  2. Go to the simple combo with groups enabled
  3. Enter ariz as a filter term, or just enter any value that will result in at least one match.
  4. Press ArrowDown
  5. Press ArrowUp
  6. Press Enter
  7. Observe

Result

Mount is entered in the combo's input as a selection. Which is the element's group's header name.

Expected result

Either return focus to the input to allow the user to change the filter (and close the dropdown) or select Arizona / the first match that is found.

Attachment

combo

Additional info

This happens because after step 5 the combo's dropdown will have focusedItem to be the first element in the dropdown which happens to be a header element. Then on Enter that element is used when trying to set the combo's value. As this element is not part of the data set it will be immediately rejected / the combo clears on blur even if the input is populated with the element / the element's id.

From a user's perspective the combo is in an edit state and expects the filter to be either edited or applied. If the former scenario is assumed, the combo should just close the dropdown and allow the user to continue editing since the input will be in focus. If the latter scenario is assumed, Enter should result in Arizona being set as the combo's value.

@georgianastasov
Copy link
Contributor

After discussions with the design team, we have agreed on the following approach to address the issue:

Upon pressing ArrowUp to select an item and then pressing Enter:

  • Instead of selecting the last item (group header), the input should retain the entered text.
  • Focus should remain on the input field to allow users to continue filtering.
  • The dropdown should remain open, displaying the filtered results based on the entered text.

Also, this behavior should be applied consistently across the normal default scenario of the igx-simple component, even when there are no group headers.

This adjustment aims to enhance usability by ensuring that the input behavior aligns with user expectations, facilitating seamless filtering and selection interactions.

@georgianastasov georgianastasov added 🛠️ status: in-development Issues and PRs with active development on them ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. 🛠️ status: in-development Issues and PRs with active development on them labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment