Skip to content

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

@stv8

Description

@stv8

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions