rez-table-listing-mui 1.3.33 → 1.3.34

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.33",
3
+ "version": "1.3.34",
4
4
  "type": "module",
5
5
  "description": "A rez table listing component built on TanStack Table",
6
6
  "main": "dist/index.js",
@@ -90,7 +90,7 @@ const SavedFilterModalView = ({
90
90
  }
91
91
 
92
92
  // EXISTING FILTER → Load from columnsData.saved_filter
93
- const filterObj = columnsData?.saved_filter?.find(
93
+ const filterObj = columnsData?.shared_filter?.find(
94
94
  (f: any) => f.id === filterId
95
95
  );
96
96
  if (filterObj) {
@@ -108,12 +108,22 @@ const SavedFilterModalView = ({
108
108
  },
109
109
  };
110
110
  });
111
- const initialShare = filterObj.is_shared ?? false;
112
- const initialAllow = initialShare
113
- ? filterObj.is_editable === "true"
114
- : false;
111
+ // const initialShare = filterObj.is_shared ?? false;
112
+ // const initialAllow = initialShare
113
+ // ? filterObj.is_editable === "true"
114
+ // : false;
115
+ // setShareWithTeam(initialShare);
116
+ // setAllowTeamEdit(initialAllow);
117
+ const initialShare =
118
+ filterObj.is_shared === true || filterObj.is_shared === "true";
119
+ const initialAllow =
120
+ initialShare &&
121
+ (filterObj.is_editable === true || filterObj.is_editable === "true");
122
+
115
123
  setShareWithTeam(initialShare);
116
124
  setAllowTeamEdit(initialAllow);
125
+
126
+ persistPreferences(initialShare, initialAllow);
117
127
  }
118
128
  }, [
119
129
  open,
@@ -206,7 +216,7 @@ const SavedFilterModalView = ({
206
216
 
207
217
  const isNewFilter = !selectedSavedFilter;
208
218
 
209
- const isshow = !isOwner;
219
+ const isshow = isOwner;
210
220
 
211
221
  return (
212
222
  <Dialog open={open} onClose={onClose} maxWidth="sm" fullWidth>
@@ -253,14 +253,14 @@ const FilterForm = ({
253
253
  )}
254
254
  />
255
255
  <Box onClick={(e) => e.stopPropagation()}>
256
- <IconButton
256
+ {/* <IconButton
257
257
  size="small"
258
258
  onClick={() =>
259
259
  setDeleteFilterModalOpen && setDeleteFilterModalOpen(true)
260
260
  }
261
261
  >
262
262
  <DeleteIcon />
263
- </IconButton>
263
+ </IconButton> */}
264
264
  </Box>
265
265
  </Box>
266
266
  )}