rez-table-listing-mui 1.3.36 → 1.3.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez-table-listing-mui",
3
- "version": "1.3.36",
3
+ "version": "1.3.38",
4
4
  "type": "module",
5
5
  "description": "A rez table listing component built on TanStack Table",
6
6
  "main": "dist/index.js",
@@ -70,6 +70,7 @@ const FilterCriteriaList = ({
70
70
  onClick={() =>
71
71
  !isSingleEntity && setSelectedFilterEntity(undefined)
72
72
  }
73
+ className="cross-icon"
73
74
  >
74
75
  <CloseIcon />
75
76
  </IconButton>
@@ -148,7 +148,13 @@ const SavedFilter = ({
148
148
  applyFilterStates(filter);
149
149
  };
150
150
 
151
- const [openAccordion, setOpenAccordion] = useState<"my" | "shared">("my");
151
+ const [openAccordion, setOpenAccordion] = useState<"my" | "shared" | null>(
152
+ "my"
153
+ );
154
+
155
+ const toggleAccodion = (accordion: "my" | "shared" | null) => {
156
+ setOpenAccordion((prev) => (prev === accordion ? null : accordion));
157
+ };
152
158
 
153
159
  // RENDER: MY FILTERS
154
160
 
@@ -325,7 +331,8 @@ const SavedFilter = ({
325
331
  elevation={0}
326
332
  expanded={openAccordion === "my"}
327
333
  onChange={() =>
328
- setOpenAccordion(openAccordion === "my" ? "shared" : "my")
334
+ // setOpenAccordion(openAccordion === "my" ? "shared" : "my")
335
+ toggleAccodion("my")
329
336
  }
330
337
  >
331
338
  <AccordionSummary
@@ -362,7 +369,8 @@ const SavedFilter = ({
362
369
  elevation={0}
363
370
  expanded={openAccordion === "shared"}
364
371
  onChange={() =>
365
- setOpenAccordion(openAccordion === "shared" ? "my" : "shared")
372
+ // setOpenAccordion(openAccordion === "shared" ? "my" : "shared")
373
+ toggleAccodion("shared")
366
374
  }
367
375
  >
368
376
  <AccordionSummary
@@ -51,6 +51,7 @@ const CustomSearch = ({
51
51
  edge="end"
52
52
  onClick={handleClear}
53
53
  sx={{ color: "#888888", fontSize: "20px" }}
54
+ className="cross-icon"
54
55
  >
55
56
  <CloseIcon />
56
57
  </IconButton>