ar-design 0.2.12 → 0.2.13

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.
@@ -23,7 +23,7 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
23
23
  // states
24
24
  const [selectAll, setSelectAll] = useState(false);
25
25
  const [selectionItems, setSelectionItems] = useState([]);
26
- const [thWidths, setThWidths] = useState([]);
26
+ // const [thWidths, setThWidths] = useState<number[]>([]);
27
27
  // states -> Search
28
28
  const [searchedText, setSearchedText] = useState(undefined);
29
29
  const [_searchedParams, setSearchedParams] = useState(undefined);
@@ -233,12 +233,11 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
233
233
  }
234
234
  setSelectAll(allChecked);
235
235
  }, [currentPage]);
236
- useEffect(() => {
237
- if (!_tableContent.current)
238
- return;
239
- const th = _tableContent.current?.querySelectorAll("table > thead > tr:first-child > th");
240
- th.forEach((item) => setThWidths((prev) => [...prev, item.getBoundingClientRect().width]));
241
- }, []);
236
+ // useEffect(() => {
237
+ // if (!_tableContent.current) return;
238
+ // const th = _tableContent.current?.querySelectorAll("table > thead > tr:first-child > th");
239
+ // th.forEach((item) => setThWidths((prev) => [...prev, item.getBoundingClientRect().width]));
240
+ // }, []);
242
241
  return (React.createElement("div", { ref: _tableWrapper, className: _tableClassName.map((c) => c).join(" ") },
243
242
  (title || description || actions || React.Children.count(children) > 0) && (React.createElement("div", { className: "header" },
244
243
  React.createElement("div", { className: "title" },
@@ -281,7 +280,8 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
281
280
  ? {
282
281
  style: { minWidth: c.config.width },
283
282
  }
284
- : { style: { maxWidth: thWidths[cIndex], minWidth: thWidths[cIndex] } }), ...(c.config?.sticky && {
283
+ : // : { style: { maxWidth: thWidths[cIndex], minWidth: thWidths[cIndex] } })}
284
+ { style: {} }), ...(c.config?.sticky && {
285
285
  "data-sticky-position": c.config.sticky,
286
286
  }) }, c.title));
287
287
  })),
@@ -361,9 +361,12 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
361
361
  ? {
362
362
  style: { minWidth: c.config.width },
363
363
  }
364
- : {
365
- style: { maxWidth: thWidths[cIndex], minWidth: thWidths[cIndex] },
366
- }), ...(c.config?.sticky && {
364
+ : // : {
365
+ // style: { maxWidth: thWidths[cIndex], minWidth: thWidths[cIndex] },
366
+ // })}
367
+ {
368
+ style: {},
369
+ }), ...(c.config?.sticky && {
367
370
  "data-sticky-position": c.config.sticky,
368
371
  }) }, React.isValidElement(render) ? render : String(render)));
369
372
  }))))) : (React.createElement("tr", null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",