@sustaina/shared-ui 1.7.0 → 1.7.1
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1551,10 +1551,13 @@ function SortableRow({
|
|
|
1551
1551
|
id: value,
|
|
1552
1552
|
disabled: name == "columns.0.id"
|
|
1553
1553
|
});
|
|
1554
|
-
const style =
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1554
|
+
const style = React4.useMemo(
|
|
1555
|
+
() => ({
|
|
1556
|
+
transform: CSS.Transform.toString(transform),
|
|
1557
|
+
transition
|
|
1558
|
+
}),
|
|
1559
|
+
[transform, transition]
|
|
1560
|
+
);
|
|
1558
1561
|
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
1559
1562
|
const currentFormColumns = useWatch({ control, name: "columns" });
|
|
1560
1563
|
return /* @__PURE__ */ jsx("div", { ref: setNodeRef, style, className: "flex items-center rounded-md bg-white", children: /* @__PURE__ */ jsx(
|
|
@@ -1563,7 +1566,7 @@ function SortableRow({
|
|
|
1563
1566
|
control,
|
|
1564
1567
|
name,
|
|
1565
1568
|
render: ({ field }) => {
|
|
1566
|
-
const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: capitalize(col.id) }));
|
|
1569
|
+
const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: col?.label ? col.label : capitalize(col.id) }));
|
|
1567
1570
|
return /* @__PURE__ */ jsxs(FormItem2, { className: "flex-1", children: [
|
|
1568
1571
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1569
1572
|
/* @__PURE__ */ jsx(
|