Check if dom element exist before change

This commit is contained in:
benguozakinci@gmail.com
2021-09-28 10:36:17 +03:00
parent 04097f5c06
commit fc86990578

View File

@ -39,6 +39,7 @@ export default class BulkAction {
if (!this.count) {
this.show = false;
this.hideSearchHTML();
}
}
@ -46,6 +47,7 @@ export default class BulkAction {
selectAll() {
this.show = false;
this.selected = [];
this.hideSearchHTML();
if (!this.select_all) {
this.show = true;
@ -181,7 +183,9 @@ export default class BulkAction {
hideSearchHTML() {
setInterval(() => {
const search_box_html = document.querySelector('.js-search-box-hidden');
search_box_html.classList.add('d-none');
if (search_box_html) {
search_box_html.classList.add('d-none');
}
}, 5);
};