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

[Combobox] clear user entered text on blur #2162

Closed
avezina opened this issue May 18, 2021 · 13 comments
Closed

[Combobox] clear user entered text on blur #2162

avezina opened this issue May 18, 2021 · 13 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. c-combobox Issues that pertain to the calcite-combobox and related components design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. low risk Issues with low risk for consideration in low risk milestones p - medium Issue is non core or affecting less that 60% of people using the library ready for dev Issues ready for development implementation.

Comments

@avezina
Copy link

avezina commented May 18, 2021

The description below is outdated and the issue title has been updated accordingly. Please read all the comments below before implementing, specifically #2162 (comment).

Description

My team is working on a widget where we need to be able to do multiple selections from a drop-down. For example in the mockup below with the multiple check-boxes.
image
image

Acceptance Criteria

Ideally, we need a way to select multiple choices, and we need the selected choices to be listed against the header item so the end-user can see which items were selected without expanding the dropdown.

Which Component

It seems the Combobox provides the option to expose the selected options as tabs, but we would like to disable the input text parameter and only rely on selecting options from the dropdown similar to the Button>Dropdown>Simple component.
image
image

We may just use the Combobox for now, and remove the input text later if that parameter is made optional.

@avezina avezina added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. labels May 18, 2021
@bstifle
Copy link

bstifle commented May 19, 2021

Hi @avezina !

The dropdown seems like unnecessary redundancy. In this use case, can we just remove the dropdown and rely on the checkboxes?

@benelan benelan added the needs triage Planning workflow - pending design/dev review. label Sep 27, 2021
@macandcheese
Copy link
Contributor

@avezina - checking in on this. Is this still valid?

@avezina
Copy link
Author

avezina commented Apr 4, 2022

@macandcheese thanks for looping back on this. Yes this is still a valid request. For example, we are using the Combobox in the UtilityNetworkTrace widget (see sample) where one or multiple values can be selected. While the text could be used to search a value, I feel like it should not persist?
image

@macandcheese
Copy link
Contributor

I can’t seem to preview that UX in the sample (it asks for authentication to view layers - after which the panel is disabled), however - the combobox shouldn’t persist text after making a selection - after it is entered and an item is selected, the text clears.

To confirm, this enhancement is to introduce a mode where no text is entered at all?

I wonder if a “multiple” select would be a better component to support that workflow since selects natively don’t have text entry or filtering associated.

That could be a valid enhancement for our select but not something currently offered in that component (and, depending on need, maybe not solved completely by an enhancement to select).

cc @benelan @geospatialem @asangma for thoughts?

@avezina
Copy link
Author

avezina commented Apr 4, 2022

@macandcheese Username and password are provided below the sample embed, in the text. Does that work on your end?

I think having a way to type to search for a value from the dropdown is still valuable, but yes I think I would expect the value to then clear once the dropdown collapses (not necessarily after an item is selected since there could be more than one item being selected from the filtered list)

@macandcheese
Copy link
Contributor

Whoops - my fault - I was viewing on a phone and the login information was just out of view.

That makes sense. As an implementation example - this is how MUI handles this: https://mui.com/components/autocomplete/#multiple-values

Basically - on blur, clear the user-entered text value.

@benelan benelan changed the title Enhancement: Make text input parameter optional for select options only workflow [Combobox] clear user entered text on blur Apr 22, 2022
@macandcheese macandcheese added the design Issues that need design consultation prior to development. label Jun 29, 2022
@brittneytewks brittneytewks added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 3 A day or two of work, likely requires updates to tests. and removed design Issues that need design consultation prior to development. needs triage Planning workflow - pending design/dev review. labels Feb 22, 2023
@macandcheese macandcheese added the c-combobox Issues that pertain to the calcite-combobox and related components label Mar 22, 2023
@geospatialem geospatialem added the ready for dev Issues ready for development implementation. label Jun 5, 2023
@geospatialem geospatialem added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jun 5, 2023
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jun 22, 2023
@anveshmekala anveshmekala self-assigned this Sep 7, 2023
@anveshmekala anveshmekala added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Sep 7, 2023
@geospatialem
Copy link
Member

Verified in 1.8.1-next.1 with the allowCustomValues set to false on blur:

<calcite-combobox allow-custom-values="false">
 ...
</calcite-combobox>

verify-2162

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 4 - verified Issues that have been released and confirmed resolved. labels Oct 5, 2023
@geospatialem
Copy link
Member

geospatialem commented Oct 5, 2023

Re-opening as the fix was reverted with the change in #7954. To ensure this is mitigated as it was intended, this will be addressed in next week's maintenance release.

@geospatialem
Copy link
Member

Reallocating to later this month, where team members can do more extensive testing with the related Windows and trackpad regression once implemented.

@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Oct 23, 2023
@brittneytewks brittneytewks added the low risk Issues with low risk for consideration in low risk milestones label Oct 23, 2023
anveshmekala added a commit that referenced this issue Oct 27, 2023
**Related Issue:** #2162 

## Summary

Clears input value on `blur` if the value has no matching
`combobox-item` when `allowCustomValue` property is set to `false`
@anveshmekala anveshmekala added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Oct 27, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Oct 27, 2023
@geospatialem
Copy link
Member

Verified in 1.10.0-next.10 with:

<calcite-combobox allow-custom-values="false">
...
</calcite-combobox>

and with the use case from #7934 to ensure Windows trackpad behaves as-expected.

@brittneytewks brittneytewks added the design Issues that need design consultation prior to development. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. c-combobox Issues that pertain to the calcite-combobox and related components design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. low risk Issues with low risk for consideration in low risk milestones p - medium Issue is non core or affecting less that 60% of people using the library ready for dev Issues ready for development implementation.
Projects
None yet
Development

No branches or pull requests

8 participants