Fixed #586 - Dropdown inside datable using showClear causing: Cannot read property 'classList' of null
parent
9b9802d838
commit
41074b0e7e
|
@ -143,12 +143,16 @@ export default class DomHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
static hasClass(element, className) {
|
static hasClass(element, className) {
|
||||||
|
if (element) {
|
||||||
if (element.classList)
|
if (element.classList)
|
||||||
return element.classList.contains(className);
|
return element.classList.contains(className);
|
||||||
else
|
else
|
||||||
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
|
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static find(element, selector) {
|
static find(element, selector) {
|
||||||
return element.querySelectorAll(selector);
|
return element.querySelectorAll(selector);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue