Skip to content

Commit ff77f76

Browse files
committed
use display prop
1 parent f6e48b4 commit ff77f76

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "Base Custom Webcomponent",
33
"name": "@node-projects/base-custom-webcomponent",
4-
"version": "0.27.3",
4+
"version": "0.27.4",
55
"type": "module",
66
"main": "./dist/index.js",
77
"author": "",

src/BaseCustomWebComponent.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,9 @@ export class BaseCustomWebComponentNoAttachedTemplate extends HTMLElement {
191191
} else if (a.name.startsWith('bcw:')) {
192192
if (a.name === 'bcw:visible') {
193193
const value = a.value.substring(2, a.value.length - 2).replaceAll('&', '&');
194-
const b1 = () => this._bindingSetElementCssValue(<HTMLElement | SVGElement>node, 'visibility', value + "?'':'collapse'", repeatBindingItems, host, context);
195-
const b2 = () => this._bindingSetElementCssValue(<HTMLElement | SVGElement>node, 'content-visibility', value + "?'':'hidden'", repeatBindingItems, host, context);
196-
this._bindings.push([b1, null]);
197-
this._bindings.push([b2, null]);
198-
b1();
199-
b2();
194+
const b = () => this._bindingSetElementCssValue(<HTMLElement | SVGElement>node, 'display', value + "?'" + node.style.display + "':'collapse'", repeatBindingItems, host, context);
195+
this._bindings.push([b, null]);
196+
b();
200197
}
201198
} else if (a.name.length === 28 && a.name === 'repeat-changed-item-callback') {
202199
//do nothing

0 commit comments

Comments
 (0)