mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: introduces onSelectAny (regroup onSelect and onSelectNone) (#7594)
This commit is contained in:
@@ -223,6 +223,10 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
|
||||
},
|
||||
|
||||
actions: {
|
||||
topicCategoryChanged(selection) {
|
||||
this.set("buffered.category_id", selection.value);
|
||||
},
|
||||
|
||||
deletePending(pending) {
|
||||
return ajax(`/review/${pending.id}`, { type: "DELETE" })
|
||||
.then(() => {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{category-chooser
|
||||
class="small"
|
||||
value=(unbound buffered.category_id)
|
||||
onSelect=(action (mut buffered.category_id))}}
|
||||
onSelectAny=(action "topicCategoryChanged")}}
|
||||
{{/if}}
|
||||
|
||||
{{#if canEditTags}}
|
||||
|
||||
@@ -223,6 +223,7 @@ export default SelectKitComponent.extend({
|
||||
);
|
||||
|
||||
this._boundaryActionHandler("onSelect", computedContentItem.value);
|
||||
this._boundaryActionHandler("onSelectAny", computedContentItem);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,6 +240,7 @@ export default SelectKitComponent.extend({
|
||||
this
|
||||
);
|
||||
this._boundaryActionHandler("onSelectNone");
|
||||
this._boundaryActionHandler("onSelectAny", computedContentItem);
|
||||
this.clearSelection();
|
||||
return;
|
||||
}
|
||||
@@ -291,6 +293,7 @@ export default SelectKitComponent.extend({
|
||||
);
|
||||
|
||||
this._boundaryActionHandler("onSelect", computedContentItem.value);
|
||||
this._boundaryActionHandler("onSelectAny", computedContentItem);
|
||||
|
||||
this.autoHighlight();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user