UNPKG

ldx-widgets

Version:

widgets

150 lines (109 loc) 2.7 kB
[<< Component Index](../README.md) # TextInput2 `/src/components/text_input_2.coffee` TextInput2 is the updated version of TextInput. This component uses the validation store. ## Mixins: `InputMixin` ## Props ### value **`String`** _Required_ The value of the input w/ out this props, the input will not work --- ### 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 input element itself --- ### inputTextClass **`String`** _Optional_ optional class to be added the input element itself when using the gridInputForm --- ### id **`String`** _Optional_ optional id to be added the input element itself --- ### placeholder **`String`** _Optional_ optional placeholder text for the input --- ### wrapperClass **`String`** _Optional_ class to be added to the wrapper div --- ### wrapperLabel _Optional_ text for wrapping label element --- ### loading **`Boolean`** _Optional_ indicator to determine that the input is loading a value from the server --- ### showClear **`Boolean`** _Optional_ indicator to determine whether or not to show the clear "X" button --- ### tabIndex **`Number`** _Optional_ tab index for the input --- ### maxLength **`Number`** _Optional_ max characters that can be entered in the input --- ### onKeyDown _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 --- ### textTransform **`Function`** _Optional_ runs the value through a transform method that will change the input before returning via getValue() --- ### focusOnMount **`Boolean`** _Optional_ Focuses the input once mounted --- ### tabId **`String`** _Optional_ If this input is within a tab, this id will be used for validation errors in the store