UNPKG

ldx-widgets

Version:

widgets

165 lines (121 loc) 3.04 kB
[<< Component Index](../README.md) # [SelectInput2](https://github.com/tmfi/ldx-web-utilities/blob/develop/src/components/select_input_2.coffee) ## Mixins: `InputMixin` ### value **`String`** _Required_ The value of the input w/ out this props, the input will not work --- ### name **`String`** _Optional_ The name of the input --- ### options **`Array/Collection`** _Required_ An array of objects w/ a value and label property or an array of objects w/ any values --- ### selectText **`String`** _Optional_ text for the default option --- ### labelField **`String`** _Required_ w/ arbitrary option array (ie no label/value properties) The attribute name from the collection of objects to be used as the select label --- ### valueField **`String`** _Required_ w/ arbittrary option array (ie no label/value properties) The attribute value from the collection of objects to be used as the select value --- ### returnFullObjects **`Boolean`** _Optional_ Get value will return a full object instead of just the value --- ### onChange **`Function`** _Required_ method that will change the value of the input prop gets passed a single param that is the new value of the input w/ out this method, the input will not update --- ### className **`String`** _Optional_ optional class to be added the select element itself --- ### id **`String`** _Optional_ optional id to be added the input element itself --- ### wrapperClass **`String`** _Optional_ class to be added to the wrapper div --- ### wrapperLabel **`String`** _Optional_ text for wrapping label element --- ### loading **`Boolean`** _Optional_ indicator to determine that the input is loading a value from the server --- ### tabIndex **`Number`** _Optional_ tab index for the input --- ### onEnterKey **`Function`** _Optional_ optional handlers for various events --- ### disabled **`Boolean`** _Optional_ disabled state of the input --- ### validation **`Function`** _Optional_ a method that takes the value and returns an arry of validation objects always return an empty array for a valid value see the validation store for more documentation on validation objects --- ### isInPopover **`Boolean`** _Optional_ set this to yes if the form is inside a popover or modal, forces the validation to display above the popover/modal layer Inconsequential if validation is not being used --- ### delayedActionOnChange **`Object`** _Optional_ Takes action and interval parameters, will fire the action after the set interval everytime the data changes --- ### openOnMount **`Boolean`** _Optional_ opens the drop down when it mounts --- ### tabId **`String`** _Optional_ If this input is within a tab, this id will be used for validation errors in the store --- ### returnNull **`Boolean`** _Required_ When the default or 'placeholder' value is selected, instead of returning empty string, return null