@bizy/core 20.4.1 → 20.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/bizy-core.mjs +12 -1
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -6309,7 +6309,7 @@ class BizyTableScrollingComponent {
|
|
|
6309
6309
|
return;
|
|
6310
6310
|
}
|
|
6311
6311
|
let itemSize = 30;
|
|
6312
|
-
const rowHeight =
|
|
6312
|
+
const rowHeight = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--anura-table-row-height');
|
|
6313
6313
|
const fontSize = getComputedStyle(this.#document.documentElement).getPropertyValue('font-size');
|
|
6314
6314
|
const gap = Number(fontSize.split('px')[0]) * 0.1;
|
|
6315
6315
|
if (rowHeight && rowHeight.includes('rem')) {
|
|
@@ -6335,6 +6335,17 @@ class BizyTableScrollingComponent {
|
|
|
6335
6335
|
}));
|
|
6336
6336
|
}
|
|
6337
6337
|
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
6338
|
+
#getClosestCssVariable = (element, cssVariable) => {
|
|
6339
|
+
while (element) {
|
|
6340
|
+
const value = getComputedStyle(element).getPropertyValue(cssVariable).trim();
|
|
6341
|
+
if (value) {
|
|
6342
|
+
return value;
|
|
6343
|
+
}
|
|
6344
|
+
element = element.parentElement;
|
|
6345
|
+
}
|
|
6346
|
+
const rootValue = getComputedStyle(this.#document.documentElement).getPropertyValue(cssVariable).trim();
|
|
6347
|
+
return rootValue || null;
|
|
6348
|
+
};
|
|
6338
6349
|
ngOnDestroy() {
|
|
6339
6350
|
this.#subscription.unsubscribe();
|
|
6340
6351
|
}
|