From 7619979daac7c6268759c7a87a80d2c3821bcabd Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 13 Mar 2018 08:19:55 +0100 Subject: [PATCH] Once the id rule is created in Component, clean its internal style --- src/dom_components/model/Component.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index 3c6fc6837..968c12340 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -328,6 +328,7 @@ const Component = Backbone.Model.extend(Styleable).extend( const propOrig = this.getStyle(); this.rule = cc.setIdRule(this.getId(), prop, { ...opts, state }); const diff = shallowDiff(propOrig, prop); + this.set('style', {}); keys(diff).forEach(pr => this.trigger(`change:style:${pr}`)); } else { prop = Styleable.setStyle.apply(this, arguments);