Skip to content

Commit 4b2c01e

Browse files
committed
add setter for class attribute used with ext tags
1 parent fbdbd9a commit 4b2c01e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/createComponentConfig.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,12 @@ function applyPropsToConfig(config, props) {
8787
if (typeof item === 'function' && item.$$isState) {
8888
o.$$attributesStateListeners.push(item.$$subscribe(value => {
8989
let setterName = createSetterName(prop);
90+
if (prop === 'class' && !isHtmlType(o.xtype)) {
91+
setterName = 'setCls';
92+
}
9093
if (typeof o[setterName] === 'function' && !o.destroyed) {
91-
o[createSetterName(prop)](buildAttributeValue());
94+
// o[createSetterName(prop)](buildAttributeValue());
95+
o[setterName](buildAttributeValue());
9296
}
9397
}));
9498
}
@@ -106,8 +110,12 @@ function applyPropsToConfig(config, props) {
106110
config.listeners.push(createEventObject('initialize', (o) => {
107111
o.$$stateListener = propsProp.$$subscribe(value => {
108112
let setterName = createSetterName(prop);
113+
if (prop === 'class' && !isHtmlType(o.xtype)) {
114+
setterName = 'setCls';
115+
}
109116
if (typeof o[setterName] === 'function' && !o.destroyed) {
110-
o[createSetterName(prop)](value);
117+
// o[createSetterName(prop)](value);
118+
o[setterName](value);
111119
}
112120
});
113121
}));

0 commit comments

Comments
 (0)