I need to click on a radiofield and check it, click another time on the same radiofield and uncheck it.
My code doesen't work because the getChecked()
is always true!
This is my function, triggered on click event.
My extjs version is 6.2.1.167
listeners: {
click: {
element: 'element',
fn: function (event, target) {
var radioField = this.component;
if (radioField.getChecked()) {
radioField.setChecked(false);
}
else {
radioField.setChecked(true);
}
}
}
},