Merge pull request #2266 from bengu-thon-mai-mochi/search-button

Hide duplicated search bar after bulk actions
This commit is contained in:
Cüneyt Şentürk 2021-09-29 18:41:49 +03:00 committed by GitHub
commit 8eb70c9600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
@ -175,8 +177,18 @@ export default class BulkAction {
this.show = false;
this.select_all = false;
this.selected = [];
this.hideSearchHTML();
}
hideSearchHTML() {
setInterval(() => {
const search_box_html = document.querySelector('.js-search-box-hidden');
if (search_box_html) {
search_box_html.classList.add('d-none');
}
}, 5);
};
// Change enabled status
status(item_id, event, notify) {
var item = event.target;