nativeOn
Register events listeners for native Events. Accepts a String
, Array
or an Object
.
String
// Option 1: String
data() {
return {
uiSchema: [{
component: 'input',
fieldOptions: {
on: 'input'
}
}]
}
}
Array
// Option 2: Arrays
data() {
return {
uiSchema: [{
component: 'input',
fieldOptions: {
nativeOn: [
'input'
]
}
}]
}
}
Object
An Object
can be used if the value should be manipulated or used elsewhere before set in to the model.
Note that the callback must be synchronous
// Option 3: Object
data() {
return {
uiSchema: [{
component: 'input',
fieldOptions: {
nativeOn: {
'input': event => String(event.target.value).toLowerCase();
}
}
}]
}
}
Last updated