mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: adds select-kit api to modify header computed content (#5476)
This api would allow to simply modify header text or icons, eg: ``` api.modifySelectKit("select-kit") .modifyHeaderComputedContent((context, computedContent) => { computedContent.title = "Not so evil"; return computedContent; }); ```
This commit is contained in:
@ -26,7 +26,7 @@ export default SelectKitComponent.extend({
|
||||
value = this._beforeDidComputeValue(value);
|
||||
this.didComputeContent(content);
|
||||
this.didComputeValue(value);
|
||||
this.set("headerComputedContent", this.computeHeaderContent());
|
||||
this._setHeaderComputedContent();
|
||||
this.didComputeAttributes();
|
||||
|
||||
if (this.get("allowInitialValueMutation")) this.mutateAttributes();
|
||||
@ -40,7 +40,7 @@ export default SelectKitComponent.extend({
|
||||
this.mutateContent(this.get("computedContent"));
|
||||
this.mutateValue(this.get("computedValue"));
|
||||
applyOnSelectPluginApiCallbacks(this.get("pluginApiIdentifiers"), this.get("computedValue"), this);
|
||||
this.set("headerComputedContent", this.computeHeaderContent());
|
||||
this._setHeaderComputedContent();
|
||||
});
|
||||
},
|
||||
mutateContent() {},
|
||||
|
Reference in New Issue
Block a user