UNPKG

ldx-widgets

Version:

widgets

75 lines (52 loc) 1.49 kB
[<< Component Index](../README.md) # [SelectInputCustomOptions](https://github.com/tmfi/ldx-web-utilities/blob/develop/src/components/select_input_custom_options.coffee) Filter select options component. This component lives on the overlay layer, and requires integrated context methods closeOverlay and openOverlay within the application. ### filter **`String`** _Optional_ Initialize the component overlay with a filter value. This will start filtering option labels based on this value. --- ### placeholder **`String`** _Optional_ Placeholder value for the filter input --- ### onChange **`Function`** _Required_ Function that is fired when a selection change is made --- ### options **`Array`** _Optional_ Array of options to render in the select --- ### optionHeight **`Number`** _Optional_ The fixed height of each menu option --- ### value **`String|Number`** _Optional_ The value of the currently selected option object --- ### noResultsText **`String`** _Optional_ Text displayed in the menu when no results match the filter input value --- ### SelectEl **`Function`** _Optional_ Reference to the select menu component that opens this overlay. If provided, focus will be directed back to the input when closing the overlay --- ### onChangeFilter **`Function`** _Optional_ Function fired when the filter input changes --- ### searchWidth **`Number`** _Optional_ Width of the search input. Default is 250