View Full Version : Theming: ui config as a String array

4 Feb 2013, 7:37 AM
A comment on Ext.AbstractComponent's ui config implies that 4.1.3 will now accept String arrays.
douglyuckling says:

"Passing a String array doesn't seem to have the desired effect. On a component, if I set ui to ['custom1', 'custom2'], the classes added are "x-component-custom1,custom2". That is, "custom2" is separated by a comma instead of a space and doesn't get the "x-component" prefix."

I still getting the behavior he is describing, despite the fact that it says it has been fixed in 4.1.3. I did debug and addUIToElement() and removeUIFromElement() are not accounting for arrays. Did you mean that you fixed the doc or that you fixed the code?

Is this something that you guys will be doing in the future? Are there any available options if I want to have hooks to multiple mixins?

6 Feb 2013, 3:04 PM
4.1.3 doesn't support arrays, just a string. uiCls looks like it will accept an array.

7 Feb 2013, 7:47 AM
Thank you for the suggestion.

From what I cantell, specifying a "ui" config automatically adds the new class tothe top level element as well as its children, allowing us to use the ui mixinsto theme the component, since css is generated for all the elements necessary.I was hoping for the string [] in the "ui" config so I can havemultiple class names added (say cls1 and cls2), so that if I don't have a cls1mixin, a style will still be applied because of cls2.

Specifying uiCls []config seems to just apply the new class name to the top level element. So if Iadded a uiCls to a panel, it only adds the class for the panel, not the header,etc.

Are there any otherconfig options I can look at that may get me closer to my goal?