Skip to content

Commit 3390cae

Browse files
committed
fix(core): Resolve Icon visibility update failure on Grid filtering (#9155)
- Update Component.show() to set visibility: null instead of delete to force VDOM delta - Document persistent state behavior in style and wrapperStyle configs - Addresses regression where filtered grid rows failed to update recycled icon visibility
1 parent c1bf2a6 commit 3390cae

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/component/Base.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ class Component extends Abstract {
205205
scrollable_: false,
206206
/**
207207
* Style attributes added to this vdom root. see: getVdomRoot()
208+
*
209+
* **Important:** When `vdom === vdomRoot` (single node component), the `wrapperStyle` mechanism
210+
* creates a persistent state loop to support runtime VDOM mutations.
211+
* This means that to *remove* a style property you previously set, you MUST set it to `null`.
212+
* Using `delete` or setting `undefined` will revert to the "previous state", which unfortunately
213+
* includes the very value you are trying to remove if it has leaked into `wrapperStyle`.
214+
*
208215
* @member {Object} style={[isDescriptor]: true, merge: 'shallow', value: null}
209216
*/
210217
style_: {
@@ -265,6 +272,10 @@ class Component extends Abstract {
265272
wrapperCls_: null,
266273
/**
267274
* Top level style attributes. Useful in case getVdomRoot() does not point to the top level DOM node.
275+
*
276+
* **Note:** The getter for this config reads `vdom.style` as a default value to support runtime mutations.
277+
* This creates the persistent state loop described in the `style_` config documentation.
278+
*
268279
* @member {Object|null} wrapperStyle_={[isDescriptor]: true, merge: 'shallow', value: null}
269280
* @reactive
270281
*/
@@ -1577,7 +1588,9 @@ class Component extends Abstract {
15771588
}
15781589
} else {
15791590
let style = me.style;
1580-
delete style.visibility;
1591+
// We need to set null, since the style might be inside wrapperStyle,
1592+
// which would get re-applied in case we just delete the property.
1593+
style.visibility = null;
15811594
me.style = style
15821595
}
15831596

0 commit comments

Comments
 (0)