ldx-widgets
Advanced tools
Comparing version 3.12.2 to 3.12.3
@@ -89,2 +89,5 @@ (function() { | ||
@props.selectOnMount - OPTIONAL - [Boolean] | ||
Selects all the input's text once mounted (TextInput and Textarea only) | ||
@props.tabId - OPTIONAL - [String] | ||
@@ -115,2 +118,3 @@ If this input is within a tab, this id will be used for validation errors in the store | ||
focusOnMount: PropTypes.bool, | ||
selectOnMount: PropTypes.bool, | ||
delayedActionOnChange: PropTypes.object, | ||
@@ -162,2 +166,3 @@ tabIndex: PropTypes.number, | ||
focusOnMount: false, | ||
selectOnMount: false, | ||
returnNull: false | ||
@@ -164,0 +169,0 @@ }; |
@@ -87,2 +87,5 @@ (function() { | ||
@props.selectOnMount - OPTIONAL - [Boolean] | ||
Selects all the input's text once mounted (TextInput and Textarea only) | ||
@props.rows - OPTIONAL - Number string - default 4 | ||
@@ -109,2 +112,3 @@ Height of textarea | ||
focusOnMount: PropTypes.bool, | ||
selectOnMount: PropTypes.bool, | ||
delayedActionOnChange: PropTypes.object, | ||
@@ -154,2 +158,3 @@ tabIndex: PropTypes.number, | ||
focusOnMount: false, | ||
selectOnMount: false, | ||
rows: "4", | ||
@@ -156,0 +161,0 @@ cols: "50" |
@@ -22,9 +22,12 @@ (function() { | ||
componentDidMount: function() { | ||
var focusOnMount, ref, validation, value; | ||
ref = this.props, value = ref.value, validation = ref.validation, focusOnMount = ref.focusOnMount; | ||
var focusOnMount, ref, selectOnMount, validation, value; | ||
ref = this.props, value = ref.value, validation = ref.validation, focusOnMount = ref.focusOnMount, selectOnMount = ref.selectOnMount; | ||
value = this.getDateValue != null ? moment(this.getDateValue()) : value; | ||
this.validate(validation, value); | ||
if (focusOnMount) { | ||
return this.focus(); | ||
this.focus(); | ||
} | ||
if (selectOnMount) { | ||
return this.selectText(); | ||
} | ||
}, | ||
@@ -159,2 +162,7 @@ componentWillReceiveProps: function(nextProps) { | ||
}, | ||
selectText: function() { | ||
var input; | ||
input = this.refs.input; | ||
return input.setSelectionRange(0, input.value.length); | ||
}, | ||
handleErrorMouseOver: function() { | ||
@@ -161,0 +169,0 @@ var isInPopover; |
@@ -152,2 +152,9 @@ [<< Component Index](../README.md) | ||
--- | ||
### selectOnMount | ||
**`Boolean`** | ||
_Optional_ | ||
Selects all the input's text once mounted (TextInput and Textarea only) | ||
--- | ||
### tabId | ||
@@ -154,0 +161,0 @@ **`String`** |
{ | ||
"name": "ldx-widgets", | ||
"version": "3.12.2", | ||
"version": "3.12.3", | ||
"description": "widgets", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10149
797816
230