tomsouthall / turnstone

React customisable autocomplete component with typeahead and grouped results from multiple APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue while having multiple Turnstone components on same page

sorja opened this issue · comments

There is an issue where the defaultListbox breaks when having multiple instances of Turnstone on same page.
Issue replicated here:
https://codesandbox.io/s/basic-turnstone-implementation-forked-c74bjm?file=/src/App.js

Expectation:

  • Click on Autocomplete (Turnstone) component
  • List of options show up
  • You can write or select from list

Issue:

  • Click on Autocomplete (Turnstone) component
  • List of some other instance of Autocomplete (Turnstone) is shown

Notes:

  • It works if defaultListbox is omitted
  • If defaultListbox is omitted, the selection menu doesn't open up automatically

Video explaining the issue:

Screen.Recording.2022-10-11.at.11.36.24.mov