ar-design 0.2.46 → 0.2.47

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.
@@ -28,6 +28,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
28
28
  const [selectAll, setSelectAll] = useState(false);
29
29
  const [selectionItems, setSelectionItems] = useState([]);
30
30
  const [showSubitems, setShowSubitems] = useState({});
31
+ const [isTrueSubitems, setIsTrueSubitems] = useState({});
31
32
  // states -> File
32
33
  const [files, setFiles] = useState([]);
33
34
  const [formData, setFormData] = useState(undefined);
@@ -190,13 +191,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
190
191
  if (_subrowSelector in item) {
191
192
  setShowSubitems((prev) => ({
192
193
  ...prev,
193
- [`${index}`]: !prev[`${index}`],
194
- }));
195
- }
196
- else {
197
- setShowSubitems((prev) => ({
198
- ...prev,
199
- [`${index}`]: false,
194
+ [`${index}`]: true,
200
195
  }));
201
196
  }
202
197
  });
@@ -257,7 +252,6 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
257
252
  } }))),
258
253
  _subrowButton && isHasSubitems ? (React.createElement("td", null, item[_subrowSelector] && (React.createElement("div", { className: "subitem-open-button-wrapper" },
259
254
  React.createElement("span", { className: `subitem-open-button ${(showSubitems[index] && "opened") ?? ""}`, onClick: () => {
260
- console.log(showSubitems);
261
255
  setShowSubitems((prev) => ({
262
256
  ...prev,
263
257
  [`${index}`]: !prev[`${index}`],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",