diff --git a/app/assets/javascripts/discourse/app/components/bulk-select-toggle.hbs b/app/assets/javascripts/discourse/app/components/bulk-select-toggle.hbs index e0b31d677f3..2caf4cb5717 100644 --- a/app/assets/javascripts/discourse/app/components/bulk-select-toggle.hbs +++ b/app/assets/javascripts/discourse/app/components/bulk-select-toggle.hbs @@ -1 +1,5 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/components/bulk-select-toggle.js b/app/assets/javascripts/discourse/app/components/bulk-select-toggle.js index 09e2a1c22f1..80ddbc7decc 100644 --- a/app/assets/javascripts/discourse/app/components/bulk-select-toggle.js +++ b/app/assets/javascripts/discourse/app/components/bulk-select-toggle.js @@ -1,15 +1,17 @@ -import Component from "@glimmer/component"; +import Component from "@ember/component"; import { action } from "@ember/object"; import { getOwner } from "discourse-common/lib/get-owner"; -export default class BulkSelectToggle extends Component { +export default Component.extend({ + parentController: null, + @action toggleBulkSelect() { const controller = getOwner(this).lookup( - `controller:${this.args.parentController}` + `controller:${this.parentController}` ); - const helper = controller.bulkSelectHelper; - helper.clear(); - helper.bulkSelectEnabled = !helper.bulkSelectEnabled; - } -} + const selection = controller.selected; + controller.toggleProperty("bulkSelectEnabled"); + selection.clear(); + }, +}); diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/components/d-navigation.hbs index 98907cbba12..ae8e4a23b25 100644 --- a/app/assets/javascripts/discourse/app/components/d-navigation.hbs +++ b/app/assets/javascripts/discourse/app/components/d-navigation.hbs @@ -17,7 +17,7 @@