You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**onBlur** |**Opt**|**Func** |**In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.** |**none** |
}} //Optional.[Func].Default: () => {}. Will return the value.
384
384
onBlur={() => {}} //Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
Copy file name to clipboardExpand all lines: example/index.js
+16-11Lines changed: 16 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -171,8 +171,8 @@ import { Select } from 'react-inputs-validation';
171
171
{ id: 'CN', name: 'China' },
172
172
{ id: 'JP', name: 'Japan' }
173
173
]} // Required.[Array of Object(s)].Default: [].
174
-
onChange={(country, e) => {
175
-
this.setState({ country });
174
+
onChange={(res, e) => {
175
+
this.setState({ country: res.id });
176
176
console.log(e);
177
177
}} // Optional.[Func].Default: () => {}. Will return the value.
178
178
onBlur={() => {}} // Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
@@ -764,8 +764,8 @@ class Index extends Component {
764
764
}}
765
765
value={country}// Optional.[String].Default: "".
766
766
optionList={[{id: '',name: 'Please Select a country'},{id: 'US',name: 'United States'},{id: 'CN',name: 'China'},{id: 'JP',name: 'Japan'}]}// Required.[Array of Object(s)].Default: [].
767
-
onChange={(country,e)=>{
768
-
this.setState({ country });
767
+
onChange={(res,e)=>{
768
+
this.setState({country: res.id});
769
769
console.log(e);
770
770
}}// Optional.[Func].Default: () => {}. Will return the value.
771
771
onBlur={()=>{}}// Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
@@ -833,7 +833,8 @@ class Index extends Component {
}}// Optional.[Func].Default: () => {}. Will return the value.
1114
1118
onBlur={()=>{}}// Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
@@ -1145,7 +1149,8 @@ class Index extends Component {
0 commit comments