From 1b180a3bdbd9318dd20cfd2de5cc64e0af2e1006 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 23 Aug 2022 19:27:54 +0100 Subject: [PATCH] DEV: Remove JQuery from `components/topic-list.js` (#18048) --- .../javascripts/discourse/app/components/topic-list.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-list.js b/app/assets/javascripts/discourse/app/components/topic-list.js index 22b01c759d4..19fb1a283d8 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list.js +++ b/app/assets/javascripts/discourse/app/components/topic-list.js @@ -176,12 +176,16 @@ export default Component.extend(LoadMore, { onClick("button.bulk-select-all", function () { this.updateAutoAddTopicsToBulkSelect(true); - $("input.bulk-select:not(:checked)").click(); + document + .querySelectorAll("input.bulk-select:not(:checked)") + .forEach((el) => el.click()); }); onClick("button.bulk-clear-all", function () { this.updateAutoAddTopicsToBulkSelect(false); - $("input.bulk-select:checked").click(); + document + .querySelectorAll("input.bulk-select:checked") + .forEach((el) => el.click()); }); onClick("th.sortable", function (element) {