createBaseSelectSearchInput
Bind a custom text input to BaseSelect with accessible keyboard and IME behavior.
createBaseSelectSearchInput connects a caller-owned <input> to a BaseSelect. Call BaseSelect.useContext() inside a BaseSelect child component and pass that state to the hook. It supplies input attributes, keyboard handling, focus registration, and IME-safe query commits.
Import#
Options and result#
Pass a Solid signal as searchValue and its setter as setSearchValue, or provide equivalent functions. setSearchValue must return the text it applies. Spread inputProps directly on an <input>. The other result methods let a custom control defer its own keyboard work during composition or discard a draft before clearing the selection.
enabled defaults to true. When false, the input is read-only and BaseSelect handles keys as a non-editable control. displayValue defaults to searchValue; a Combobox can supply the selected label while closed. transformInput runs before a completed input is committed. maxLength sets the native input attribute; clamp the value in your setter too when programmatic updates must obey the same limit. autocomplete defaults to off.