@ahrowe/ui 0.1.21 → 0.1.22

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.mjs CHANGED
@@ -5111,7 +5111,16 @@ 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 && parseFloat(getComputedStyle(n).paddingRight) || 0, a = n.scrollWidth + i;
5114
+ let i = parseFloat(getComputedStyle(n).paddingRight) || 0, a = n.scrollWidth + (n.scrollWidth > n.clientWidth ? i : 0);
5115
+ if (n.firstElementChild) {
5116
+ let e = n.getBoundingClientRect().left, t = e;
5117
+ n.querySelectorAll("*").forEach((e) => {
5118
+ let n = e.getBoundingClientRect();
5119
+ n.right > t && (t = n.right);
5120
+ });
5121
+ let r = Math.ceil(t - e) + i;
5122
+ r > a && (a = r);
5123
+ }
5115
5124
  a > (t.get(r) ?? 0) && t.set(r, a);
5116
5125
  }), t.size !== 0 && S((n) => {
5117
5126
  let r = !1, i = { ...n };