@ceed/ads 0.0.24 → 0.0.25
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.
|
@@ -109,31 +109,15 @@ function useDataTableRenderer(_a) {
|
|
|
109
109
|
var _a, _b;
|
|
110
110
|
var ref = useRef(null);
|
|
111
111
|
var style = useMemo(function () {
|
|
112
|
+
var _a;
|
|
112
113
|
return ({
|
|
113
114
|
width: column.width,
|
|
114
|
-
minWidth: column.minWidth,
|
|
115
|
+
minWidth: (_a = column.minWidth) !== null && _a !== void 0 ? _a : "50px",
|
|
115
116
|
maxWidth: column.maxWidth,
|
|
116
117
|
textAlign: column.type === "number" ? "end" : "start",
|
|
117
118
|
position: stickyHeader ? undefined : "relative",
|
|
118
119
|
});
|
|
119
120
|
}, [column, stickyHeader]);
|
|
120
|
-
useEffect(function () {
|
|
121
|
-
if (column.resizable && ref.current) {
|
|
122
|
-
var resizeObserver_1 = new ResizeObserver(function (entries) {
|
|
123
|
-
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
124
|
-
var entry = entries_1[_i];
|
|
125
|
-
var width = entry.contentRect.width;
|
|
126
|
-
if (width && ref.current) {
|
|
127
|
-
ref.current.style.width = "".concat(width, "px");
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
resizeObserver_1.observe(ref.current);
|
|
132
|
-
return function () {
|
|
133
|
-
resizeObserver_1.disconnect();
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
}, [column.resizable, ref.current]);
|
|
137
121
|
var resizer = ((_a = column.resizable) !== null && _a !== void 0 ? _a : true) ? (React.createElement(Box, { sx: {
|
|
138
122
|
position: "absolute",
|
|
139
123
|
top: 0,
|
package/framer/index.js
CHANGED
|
@@ -32276,29 +32276,13 @@ function useDataTableRenderer({
|
|
|
32276
32276
|
const style4 = useMemo32(
|
|
32277
32277
|
() => ({
|
|
32278
32278
|
width: column2.width,
|
|
32279
|
-
minWidth: column2.minWidth,
|
|
32279
|
+
minWidth: column2.minWidth ?? "50px",
|
|
32280
32280
|
maxWidth: column2.maxWidth,
|
|
32281
32281
|
textAlign: column2.type === "number" ? "end" : "start",
|
|
32282
32282
|
position: stickyHeader ? void 0 : "relative"
|
|
32283
32283
|
}),
|
|
32284
32284
|
[column2, stickyHeader]
|
|
32285
32285
|
);
|
|
32286
|
-
useEffect33(() => {
|
|
32287
|
-
if (column2.resizable && ref.current) {
|
|
32288
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
32289
|
-
for (const entry of entries) {
|
|
32290
|
-
const { width: width2 } = entry.contentRect;
|
|
32291
|
-
if (width2 && ref.current) {
|
|
32292
|
-
ref.current.style.width = `${width2}px`;
|
|
32293
|
-
}
|
|
32294
|
-
}
|
|
32295
|
-
});
|
|
32296
|
-
resizeObserver.observe(ref.current);
|
|
32297
|
-
return () => {
|
|
32298
|
-
resizeObserver.disconnect();
|
|
32299
|
-
};
|
|
32300
|
-
}
|
|
32301
|
-
}, [column2.resizable, ref.current]);
|
|
32302
32286
|
const resizer = column2.resizable ?? true ? /* @__PURE__ */ jsx2(
|
|
32303
32287
|
Box_default2,
|
|
32304
32288
|
{
|