No description
Find a file
2025-01-22 15:46:10 +01:00
src Fix error with default selected option 2025-01-22 15:46:10 +01:00
index.html Add support for placeholders as attributes 2025-01-17 13:29:08 +01:00
jsconfig.json Initial commit 2024-12-17 18:36:02 +01:00
package.json Fix error with default selected option 2025-01-22 15:46:10 +01:00
readme.md Add support for placeholders as attributes 2025-01-17 13:29:08 +01:00

Attributes

  • placeholder Placeholder displayed when nothing is selected
  • search-placeholder Placeholder passed to the search input in the drop-down

Slots

  • placeholder: Only shown when nothing is selected (replaces attribute placeholder if present)
  • loading: Hidden by default, shown instead of items while populate() runs

Parts

  • display: The outer display box that is always shown
  • display-text: The text representing the currently selected value
  • drop-down: The dialog element that pops up when the list is opened
  • search: The search input box
  • list: The wrapper containing the items
  • item: The individual selectable list items

Hooks

  • populate(): If present, gets called after opening to populate the options list
  • search(string): Called on search input to update the list of options
  • match(string, element): Used by search to compare each option to the search string

Properties

  • closeSignal: (read-only) An AbortSignal that fires when the drop-down closes

Events

  • change: Fired whenever the value changes, even if via JavaScript
  • input: Fired when the value is changed by selecting an option (after change)