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

Combo box different selection and clear behaviour #3785

Closed
1 task done
origami-z opened this issue Jul 9, 2024 · 6 comments
Closed
1 task done

Combo box different selection and clear behaviour #3785

origami-z opened this issue Jul 9, 2024 · 6 comments
Assignees
Labels
community For issues that have been raised by folks outside the core Salt team component: combo box type: enhancement 💡 New feature or request

Comments

@origami-z
Copy link
Contributor

origami-z commented Jul 9, 2024

Area

UI Components

The problem

Currently following is combo box behavior

  • If user select any option then they have to erase complete text or most part of the text to show complete list and update option.

  • If user adds some text and then move out and then focus inside it wont show the selected option and something wont show options to user(If previous entered text doesn't match with options).

The solution

It is good to have following things:

  • Show all option on focus

  • Show filtered selected option when user types

  • Clearing filter string if no selection is made

    • If there was no selection earlier, show blank

    • If there was a selection before, clear filter string and revert to previous selection

  • Clear selection if filter string is made blank by user. (done in

    if (value === "" && !multiselect) {
    clear(event);
    }
    )

Alternatives and examples

https://codesandbox.io/p/sandbox/react-hook-form-salt-combobox-y2nd96

Are you a JPMorgan Chase & Co. employee?

  • I am an employee of JPMorgan Chase & Co.
@origami-z origami-z added type: enhancement 💡 New feature or request status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged. community For issues that have been raised by folks outside the core Salt team component: combo box labels Jul 9, 2024
@origami-z
Copy link
Contributor Author

cc @bhoppers2008 @joshwooding

@bhoppers2008
Copy link

bhoppers2008 commented Jul 18, 2024

On this bullet "If there was a selection before, clear filter string and revert to previous selection"... i find it unexpected that an 'Esc' key press doesn't revert to previous selection at any point (even if all characters have been removed from the field).

This bullet is very similar to bullet 4... If speed is essential than i can see a benefit. Not sure it should be default behaviour though.

@origami-z origami-z removed their assignment Jul 22, 2024
@yunjungyeh
Copy link
Contributor

yunjungyeh commented Aug 1, 2024

Interaction specs are done and to be reviewed, details & links in teams group chat.
cc @origami-z @bhoppers2008 @joshwooding

  1. Show all option on focus - code example as Custom Filtering
  2. Show filtered selected option when user types - code to be done + a bug to be fixed: for now it's different behaviour between clicking arrow button and the input
  3. Clearing filter string - code to be done
  4. Clear selection if filter string is made blank by user - code done

@mark-tate
Copy link
Contributor

Cortado Goal: Design to present their findings and new ticket to implement in Doppio

@mark-tate
Copy link
Contributor

Cortado Goal: create tickets for each example and label "help wanted"

@mark-tate
Copy link
Contributor

closing in favour of individual issues #3953, #3954, #3952

@joshwooding joshwooding removed the status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community For issues that have been raised by folks outside the core Salt team component: combo box type: enhancement 💡 New feature or request
Projects
Development

No branches or pull requests

5 participants