@ahrowe/ui 0.1.21 → 0.1.23
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5111,7 +5111,20 @@ function pi({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
5111
5111
|
e.querySelectorAll("[data-fit-key]").forEach((e) => {
|
|
5112
5112
|
let n = e, r = n.getAttribute("data-fit-key");
|
|
5113
5113
|
if (!r) return;
|
|
5114
|
-
let i = n.scrollWidth > n.clientWidth
|
|
5114
|
+
let i = n.scrollWidth > n.clientWidth, a = n.scrollWidth;
|
|
5115
|
+
if (i || n.firstElementChild) {
|
|
5116
|
+
let e = getComputedStyle(n), t = parseFloat(e.paddingLeft) || 0, r = parseFloat(e.paddingRight) || 0;
|
|
5117
|
+
if (i && (a += r), n.firstElementChild && !i && n.scrollWidth <= t + r + 1) {
|
|
5118
|
+
let e = Infinity, i = -Infinity;
|
|
5119
|
+
if (n.querySelectorAll("*").forEach((t) => {
|
|
5120
|
+
let n = t.getBoundingClientRect();
|
|
5121
|
+
n.left < e && (e = n.left), n.right > i && (i = n.right);
|
|
5122
|
+
}), i > e) {
|
|
5123
|
+
let n = Math.ceil(i - e) + t + r;
|
|
5124
|
+
n > a && (a = n);
|
|
5125
|
+
}
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5115
5128
|
a > (t.get(r) ?? 0) && t.set(r, a);
|
|
5116
5129
|
}), t.size !== 0 && S((n) => {
|
|
5117
5130
|
let r = !1, i = { ...n };
|