question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select/Dropdown/Autosuggest

See original GitHub issue

Just opening the issue to put together some links/ideas/suggestions about this/these component(s).

Initial thought on API:

<Dropdown.Container>
  {dropdown => (
    <Block>
      <Dropdown.Input {...dropdown} />
      <Dropdown.ArrowButton {...dropdown} />
      {/* Maybe using Popover and Menu */}
      <Dropdown {...dropdown}>
        <Dropdown.Item>Item 1</Dropdown.Item>
        <Dropdown.Item>Item 2</Dropdown.Item>
      </Dropdown>
    </Block>
  )}
</Dropdown.Container>

EDIT: Update with v1 API

const listbox = useListboxState();
<Listbox {...listbox}>
  <ListboxItem {...listbox}>item 1</ListboxItem>
  <ListboxItem {...listbox}>item 2</ListboxItem>
  <ListboxItem {...listbox}>item 3</ListboxItem>
</Listbox>
const listbox = useListboxPopoverState();
<ListboxButton {...listbox} />
<ListboxPopover {...listbox}>
  <ListboxItem {...listbox}>item 1</ListboxItem>
  <ListboxItem {...listbox}>item 2</ListboxItem>
  <ListboxItem {...listbox}>item 3</ListboxItem>
</ListboxPopover>
const combobox = useComboboxListboxState();
<Combobox {...combobox} />
<ComboboxListbox {...combobox}>
  <ComboboxListboxItem {...combobox}>item 1</ComboboxListboxItem>
  <ComboboxListboxItem {...combobox}>item 2</ComboboxListboxItem>
  <ComboboxListboxItem {...combobox}>item 3</ComboboxListboxItem>
</ComboboxListbox>
const combobox = useComboboxListboxPopoverState();
<Combobox {...combobox} />
<ComboboxListboxPopover {...combobox}>
  <ComboboxListboxItem {...combobox}>item 1</ComboboxListboxItem>
  <ComboboxListboxItem {...combobox}>item 2</ComboboxListboxItem>
  <ComboboxListboxItem {...combobox}>item 3</ComboboxListboxItem>
</ComboboxListboxPopover>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:24 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
vvocommented, Dec 13, 2020

I am using the Combobox in production: works well now 😃 Temporary documentation is at https://github.com/reakit/reakit/tree/master/packages/reakit/src/Combobox/

1reaction
diegohazcommented, Mar 5, 2021

Hey @strass! I’m not sure if it’s the same design as yours, but I’ve created this example a few months ago: https://codesandbox.io/s/reakit-combobox-with-tags-smfgu

On the API, I imagine we could have a separate Tag component that could be combined with Combobox, like this: https://twitter.com/diegohaz/status/1337358924236939268

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hidden Auto Suggestion drop-down values - How to handle in ...
First inspect the text field using developer tool selector or simply do right click > Inspect. · Go to 'Event Listeners' tab from...
Read more >
Autocomplete Dropdown using native HTML
The input starts behaving like a select and when we start typing it searches inside the options of the datalist. Let's see it...
Read more >
Click value from auto suggest dropdown in selenium
Click value from auto suggest dropdown in selenium · You can try just press enter key without arrow down. – Murthi · If...
Read more >
How To Create Autocomplete on an Input Field - W3Schools
Example ; form autocomplete="off" action="/action_page.php" ; div class="autocomplete" style="width:300px;" ; input id="myInput" type="text" name="myCountry" ...
Read more >
Editable Combobox With List Autocomplete Example - W3C
About This Example · Select-Only Combobox: A single-select combobox with no text input that is functionally similar to an HTML select element.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found