accessible-autocomplete icon indicating copy to clipboard operation
accessible-autocomplete copied to clipboard

showAllValues not working with Custom results

Open ilbonte opened this issue 3 years ago • 1 comments

The options list is not showing when using custom results/tempaltes

Step to reproduce:

  • clone the repo
  • add toshowAllValues: true, the custom result example (https://github.com/alphagov/accessible-autocomplete/blob/d892838bd2f634a4261a121eaa135cf1b502fc6b/examples/index.html#L515-L525)

Used the last version of this library on chrome on OSX

Is there a workaround to fix this behaviour?

ilbonte avatar Apr 22 '22 08:04 ilbonte

I've also noticed that when I focus the input element and press the down arrow key I get an exception:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'focus')
    at e.t.componentDidUpdate (autocomplete.js:133:39)
    at V (preact.mjs:597:1)
    at f (preact.mjs:84:1)
t.componentDidUpdate @ autocomplete.js:133
V @ preact.mjs:597
f @ preact.mjs:84
Promise.then (async)
a @ preact.mjs:75
setState @ preact.mjs:690
(anonymous) @ autocomplete.js:319
customSuggest @ index.html:496
t.handleDownArrow @ autocomplete.js:318
t.handleKeyDown @ autocomplete.js:382
d @ preact.mjs:179
image

ilbonte avatar Apr 22 '22 08:04 ilbonte