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:
Joffrey JAFFEUX
2018-01-09 10:52:32 +01:00
committed by GitHub
parent c9f42506b7
commit c9921869f1
6 changed files with 68 additions and 7 deletions

View File

@ -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() {},