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 feature requests #198

Open
wolfgang-ch opened this issue Jul 9, 2020 · 4 comments
Open

Combobox feature requests #198

wolfgang-ch opened this issue Jul 9, 2020 · 4 comments
Labels
blocked by upstream Requires a fix upstream

Comments

@wolfgang-ch
Copy link

wolfgang-ch commented Jul 9, 2020

  • Close selection box with Esc key
    Currently the selection box can only be closed with the keyboard by pressing the Enter or Tab key.
    The Enter key do also select the item in the selection box, the Tab key moves to the next field. To just close the selection box without any other action is currently not possible.

  • Open selection box when starting the editing in the input field
    The selection box will display then the filtered items, like the search field in a browser.

  • Provide a focus() method for the combobox component
    When a webpage is loaded, the focus could then be set to the combobox input field.

Sorry with all my feature requests and issues that I've submitted but I try to get a similar user experience like the dojo FilteringSelect widget https://dojotoolkit.org/reference-guide/1.10/dijit/form/FilteringSelect.html

@metonym
Copy link
Collaborator

metonym commented Jul 19, 2020

@wolfgang-ch

Close selection box with Esc key

Fixed in version 0.8.2

Open selection box when starting the editing in the input field

Can you elaborate on this request?

By "starting the editing," do you mean on focusing the element? Or actually typing something in the filterable variant?

Provide a focus() method for the combobox component

As of version 0.8.0, you can bind a reference to the input element using the ref prop.

Example in Svelte REPL

<script>
  import { onMount } from "svelte";
  import { ComboBox } from "carbon-components-svelte@0.8.2";

  let ref;

  onMount(() => {
    ref.focus();
  })
</script>

<ComboBox bind:ref />

@wolfgang-ch
Copy link
Author

It is great that the combobox gets more features :-)

The Example in Svelte REPL is a good starting point to test the combobox.

Instead of writing in words how the editing should be, there is a good dojo example where you can test the editing behavior. Press the Run button in https://dojotoolkit.org/reference-guide/1.10/dijit/form/FilteringSelect.html

filtering-select-2

@metonym
Copy link
Collaborator

metonym commented Jul 20, 2020

@wolfgang-ch Excellent. I'll definitely consider an enhancement where:

  • combobox value is autocompleted based on the first matching entry
  • pressing "tab" autocompletes the matching value

@theetrain
Copy link
Collaborator

It looks like this exact proposal is being tracked here: carbon-design-system/carbon#9260

Let's watch how that turns out so that we can proceed with best practices based on user research.

@theetrain theetrain added the blocked by upstream Requires a fix upstream label Jan 6, 2023
@metonym metonym removed their assignment May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by upstream Requires a fix upstream
Projects
None yet
Development

No branches or pull requests

3 participants