pace-table-lib 1.0.48 → 1.0.50
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.
|
@@ -8307,7 +8307,10 @@ function getPercentageBy(dataValue, totalValue) {
|
|
|
8307
8307
|
const den = Number(totalValue);
|
|
8308
8308
|
if (isNaN(num) || isNaN(den)) return num;
|
|
8309
8309
|
if (den === 0) return num;
|
|
8310
|
-
|
|
8310
|
+
let percentage = num / den;
|
|
8311
|
+
if (Math.abs(percentage) < 1e-10) {
|
|
8312
|
+
percentage = 0;
|
|
8313
|
+
}
|
|
8311
8314
|
return percentage;
|
|
8312
8315
|
}
|
|
8313
8316
|
function createBorder(bWidth, bType, bColor) {
|
|
@@ -17517,6 +17520,14 @@ function StaticTable({
|
|
|
17517
17520
|
}, 0);
|
|
17518
17521
|
return () => clearTimeout(t);
|
|
17519
17522
|
}, [tableWidth, tableHeight, tableData, isFitTableOn, Table2, measureFormatConfigs]);
|
|
17523
|
+
useEffect(() => {
|
|
17524
|
+
if (colHeaderWrapperRef && colHeaderWrapperRef.current) {
|
|
17525
|
+
colHeaderWrapperRef.current.style.left = "0px";
|
|
17526
|
+
}
|
|
17527
|
+
if (rowHeaderWrapperRef && rowHeaderWrapperRef.current) {
|
|
17528
|
+
rowHeaderWrapperRef.current.style.top = "0px";
|
|
17529
|
+
}
|
|
17530
|
+
}, [isFitTableOn]);
|
|
17520
17531
|
const conditionalFormatsByType = useMemo(() => {
|
|
17521
17532
|
const map = { value: [], "row header": [], "column header": [] };
|
|
17522
17533
|
conditionalFormatArr?.forEach((format) => {
|