Fixed #3691 - DataTable: cannot uncheck when click the checkbox in column

pull/3699/head
mertsincan 2023-03-02 12:34:02 +00:00
parent c623f45f25
commit c3370293cd
1 changed files with 17 additions and 14 deletions

View File

@ -578,21 +578,24 @@ export default {
}, },
isClickable(element) { isClickable(element) {
if (element) {
const targetNode = element.nodeName; const targetNode = element.nodeName;
const parentNode = element.parentElement && element.parentElement.nodeName; const parentNode = element.parentElement && element.parentElement.nodeName;
return ( return (
targetNode == 'INPUT' || targetNode === 'INPUT' ||
targetNode == 'BUTTON' || targetNode === 'TEXTAREA' ||
targetNode == 'A' || targetNode === 'BUTTON' ||
parentNode == 'INPUT' || targetNode === 'A' ||
parentNode == 'BUTTON' || parentNode === 'INPUT' ||
parentNode == 'A' || parentNode === 'TEXTAREA' ||
this.hasClass(element, 'p-button') || parentNode === 'BUTTON' ||
this.hasClass(element.parentElement, 'p-button') || parentNode === 'A' ||
this.hasClass(element.parentElement, 'p-checkbox') || !!element.closest('.p-button, .p-checkbox, .p-radiobutton')
this.hasClass(element.parentElement, 'p-radiobutton')
); );
}
return false;
}, },
applyStyle(element, style) { applyStyle(element, style) {