@konoma-development/react-components 0.3.1 → 0.3.2

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.
@@ -22651,7 +22651,7 @@ function Table({
22651
22651
  const currentColumnsLeft = useMemo(() => columnsLeft?.filter((column) => !column?.hidden) || [], [columnsLeft]);
22652
22652
  const currentColumnsCenter = useMemo(() => columnsCenter?.filter((column) => !column?.hidden) || [], [columnsCenter]);
22653
22653
  const currentColumnsRight = useMemo(() => columnsRight?.filter((column) => !column?.hidden) || [], [columnsRight]);
22654
- const [detailsOpen, setDetailsOpen] = useState(false);
22654
+ const [detailsOpen, setDetailsOpen] = useState([]);
22655
22655
  useEffect(() => {
22656
22656
  if (!triggeredFilter) {
22657
22657
  return;
@@ -22923,9 +22923,13 @@ function Table({
22923
22923
  onClick: (e) => {
22924
22924
  e.stopPropagation();
22925
22925
  e.preventDefault();
22926
- setDetailsOpen(!detailsOpen);
22926
+ setDetailsOpen((prev) => {
22927
+ const newDetailsOpen = [...prev];
22928
+ newDetailsOpen[i] = !newDetailsOpen[i];
22929
+ return newDetailsOpen;
22930
+ });
22927
22931
  },
22928
- children: /* @__PURE__ */ jsx(Icon, { name: detailsOpen ? "heroicons:chevron-down" : "heroicons:chevron-right", className: "h-5 w-5" })
22932
+ children: /* @__PURE__ */ jsx(Icon, { name: detailsOpen[i] ? "heroicons:chevron-down" : "heroicons:chevron-right", className: "h-5 w-5" })
22929
22933
  }
22930
22934
  ) }),
22931
22935
  currentColumnsLeft.map((column) => {
@@ -22984,7 +22988,7 @@ function Table({
22984
22988
  ]
22985
22989
  }
22986
22990
  ),
22987
- detailsRow && detailsOpen && /* @__PURE__ */ jsx("div", { className: "ml-12", children: detailsRow(entry) })
22991
+ detailsRow && detailsOpen[i] && /* @__PURE__ */ jsx("div", { className: "ml-12", children: detailsRow(entry) })
22988
22992
  ] }, i);
22989
22993
  }) }),
22990
22994
  data.length === 0 && /* @__PURE__ */ jsx("div", { "data-testid": name + "-table-no-data", className: noDataClasses, children: noEntryLabel })