Merge pull request #2266 from bengu-thon-mai-mochi/search-button
Hide duplicated search bar after bulk actions
This commit is contained in:
commit
8eb70c9600
12
resources/assets/js/plugins/bulk-action.js
vendored
12
resources/assets/js/plugins/bulk-action.js
vendored
@ -39,6 +39,7 @@ export default class BulkAction {
|
|||||||
|
|
||||||
if (!this.count) {
|
if (!this.count) {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
|
this.hideSearchHTML();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ export default class BulkAction {
|
|||||||
selectAll() {
|
selectAll() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.selected = [];
|
this.selected = [];
|
||||||
|
this.hideSearchHTML();
|
||||||
|
|
||||||
if (!this.select_all) {
|
if (!this.select_all) {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
@ -175,8 +177,18 @@ export default class BulkAction {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
this.select_all = false;
|
this.select_all = false;
|
||||||
this.selected = [];
|
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
|
// Change enabled status
|
||||||
status(item_id, event, notify) {
|
status(item_id, event, notify) {
|
||||||
var item = event.target;
|
var item = event.target;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user