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

Error when attempting to clear the input of the combobox after selection #68

Open
stv8 opened this issue Aug 27, 2023 · 1 comment
Open

Comments

@stv8
Copy link

stv8 commented Aug 27, 2023

I'm attempting to clear the combobox input after selecting an item like so.

  function handleSelect(e: Event) {
    ...select actions
    $combobox.selected = null;
  }

However I get the error

Uncaught TypeError: can't access property "value", t2.items[t2.active] is undefined
    q list.ts:37
    <anonymous> combobox.ts:227
    sync index.mjs:77
    unsubscribers index.mjs:89
    set index.mjs:34

My use case is that the user searches a dynamic data set via the combobox, I then perform an action with their selection, then I would like to clear to input.

Let me know if this is kind of a weird use case, otherwise thanks for the work on the library :)

@stv8 stv8 changed the title Error when attempting to clear the input of the combobox Error when attempting to clear the input of the combobox after selection Aug 27, 2023
@CaptainCodeman
Copy link
Owner

Thanks, I'll take a look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants