Hi,
Got this :
{
view:'text',
clear:true,
on:{
onTimedKeypress:() => {
[...]
}
}
}
Is there a clean webix way to handle “onClear” ? i.e something like that
{
view:'text',
clear:true,
on:{
onTimedKeypress:() => {
[...]
},
onClear:() => {
}
}
}
Seem’s onChange can be used
{
on:{
onChange:value => {
console.log('value is now', value);
}
}
Note: onChange is called twice when clicking on the clear button. First one got the previous value, second one empty as expected.
Good evening @franck34!
Unfortunately, there is no separate event of the “onClear” type. However, onChange() event is really suitable for this purpose.
onChange() being called twice is a bug, thanks for the report! We’ll fix it as soon as possible.
1 Like