mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +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:
parent
c9f42506b7
commit
c9921869f1
6 changed files with 68 additions and 7 deletions
|
@ -45,7 +45,7 @@ export default SelectKitComponent.extend({
|
|||
values = this.willComputeValues(values);
|
||||
values = this.computeValues(values);
|
||||
values = this._beforeDidComputeValues(values);
|
||||
this.set("headerComputedContent", this.computeHeaderContent());
|
||||
this._setHeaderComputedContent();
|
||||
this.didComputeContent(content);
|
||||
this.didComputeValues(values);
|
||||
this.didComputeAttributes();
|
||||
|
@ -86,7 +86,7 @@ export default SelectKitComponent.extend({
|
|||
this.mutateContent(this.get("computedContent"));
|
||||
this.mutateValues(this.get("computedValues"));
|
||||
applyOnSelectPluginApiCallbacks(this.get("pluginApiIdentifiers"), this.get("computedValues"), this);
|
||||
this.set("headerComputedContent", this.computeHeaderContent());
|
||||
this._setHeaderComputedContent();
|
||||
});
|
||||
},
|
||||
mutateValues(computedValues) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue