rez-table-listing-mui 0.0.4 → 0.0.6

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.
@@ -95,17 +95,17 @@ function TableBody<T>({
95
95
 
96
96
  if (row.getIsExpanded()) {
97
97
  return (
98
- console.log("row.getIsExpanded() in table-head", row.getIsExpanded()),
99
- (
100
- <React.Fragment key={row.id}>
101
- {renderedRow}
102
- <tr>
103
- <td colSpan={table.getAllLeafColumns().length}>
104
- {NestedComponent && <NestedComponent {...{ row }} />}
105
- </td>
106
- </tr>
107
- </React.Fragment>
108
- )
98
+ <React.Fragment key={row.id}>
99
+ {renderedRow}
100
+ <tr>
101
+ {" "}
102
+ {/* // this is for the nested row. Extra line is coming in ui when
103
+ opening the nested data. */}
104
+ {/* <td colSpan={table.getAllLeafColumns().length}> */}
105
+ {NestedComponent && <NestedComponent {...{ row }} />}
106
+ {/* </td> */}
107
+ </tr>
108
+ </React.Fragment>
109
109
  );
110
110
  } else {
111
111
  return renderedRow;
@@ -3,8 +3,8 @@ import {
3
3
  ChangeLayoutIcon,
4
4
  SearchIcon,
5
5
  SortingIcon,
6
- CustomizationIcon,
7
6
  HideColumnIcon,
7
+ FilterIcon,
8
8
  } from "../../assets/svg";
9
9
  import { Popover } from "@mui/material";
10
10
  import LayoutSelector from "../table-change-layout";
@@ -55,7 +55,7 @@ function Topbar<T>({
55
55
  table.getAllLeafColumns().map((col) => col.id)
56
56
  );
57
57
 
58
- console.log("showColumnHiding", showColumnHiding); //only for built purpose-> remove it later
58
+ // console.log("showColumnHiding", showColumnHiding); //only for built purpose-> remove it later
59
59
 
60
60
  // sync column order with table instance
61
61
  useEffect(() => {
@@ -68,9 +68,9 @@ function Topbar<T>({
68
68
  showColumnToggle,
69
69
  showChangeLayoutToggle,
70
70
  viewMoreToggle,
71
- showSearch,
72
- showFilter,
73
- showCustomizationToggle,
71
+ showSortToggle,
72
+ // showFilter,
73
+ showFilterToggle,
74
74
  } = topbarOptions ?? {};
75
75
 
76
76
  const { container: fullscreenContainer } = useFullscreenPopoverContainer();
@@ -115,7 +115,7 @@ function Topbar<T>({
115
115
  </div>
116
116
  )} */}
117
117
 
118
- {showSearch && (
118
+ {showSortToggle && (
119
119
  <div className="search-wrapper" ref={searchContainerRef}>
120
120
  <div
121
121
  className="search-icon ts--button"
@@ -183,7 +183,7 @@ function Topbar<T>({
183
183
  </>
184
184
  )}
185
185
 
186
- {showFilter && (
186
+ {showFilterToggle && (
187
187
  <>
188
188
  <div
189
189
  className="filter ts--button"
@@ -204,9 +204,9 @@ function Topbar<T>({
204
204
  </>
205
205
  )}
206
206
 
207
- {showCustomizationToggle && (
207
+ {showFilterToggle && (
208
208
  <div className="customization ts--button" title="Filter">
209
- <CustomizationIcon />
209
+ <FilterIcon />
210
210
  </div>
211
211
  )}
212
212
 
@@ -135,6 +135,15 @@ const ViewMore = ({
135
135
  color: "#000",
136
136
  fontSize: "13px",
137
137
  }}
138
+ MenuProps={{
139
+ container: fullscreenContainer,
140
+ disablePortal: false,
141
+ PaperProps: {
142
+ style: {
143
+ zIndex: 1500,
144
+ },
145
+ },
146
+ }}
138
147
  >
139
148
  <MenuItem value="Comfy">Comfy</MenuItem>
140
149
  <MenuItem value="Compact">Compact</MenuItem>
@@ -161,6 +170,15 @@ const ViewMore = ({
161
170
  color: "#000",
162
171
  fontSize: "13px",
163
172
  }}
173
+ MenuProps={{
174
+ container: fullscreenContainer,
175
+ disablePortal: false,
176
+ PaperProps: {
177
+ style: {
178
+ zIndex: 1500,
179
+ },
180
+ },
181
+ }}
164
182
  >
165
183
  <MenuItem value="None">None</MenuItem>
166
184
  <MenuItem value="Status">Status</MenuItem>
@@ -10,7 +10,7 @@ import { CraftTableOptionsProps } from "../../types/table-options";
10
10
  export function useCraftTable() {
11
11
  const [pagination, setPagination] = useState<PaginationState>({
12
12
  pageIndex: 0,
13
- pageSize: 25,
13
+ pageSize: 200,
14
14
  });
15
15
  const [sorting, setSorting] = useState<SortingState>([]);
16
16
  const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
@@ -26,7 +26,9 @@ export const useDefaultColumns = () => {
26
26
  // ),
27
27
  cell: ({ row, getValue }) => {
28
28
  return (
29
- <div style={{ paddingLeft: `${row.depth * 2}rem` }}>
29
+ <div
30
+ style={{ paddingLeft: `${row.depth * 2}rem`, display: "flex" }}
31
+ >
30
32
  {row.getCanExpand() ? (
31
33
  <button
32
34
  style={{
@@ -48,7 +50,8 @@ export const useDefaultColumns = () => {
48
50
  ) : (
49
51
  <span style={{ marginRight: "0.8rem" }}></span>
50
52
  )}
51
- {getValue<boolean>()}
53
+ {/* {getValue<boolean>()} */}
54
+ <p style={{ marginTop: "0.5rem" }}>{getValue<boolean>()}</p>
52
55
  </div>
53
56
  );
54
57
  },
@@ -33,10 +33,10 @@ export interface TopbarOptionsProps {
33
33
  showCompactTableToggle?: boolean;
34
34
  showChangeLayoutToggle?: boolean;
35
35
  viewMoreToggle?: boolean;
36
- showAddNewButton?: boolean;
36
+ showAddNewButton?: boolean; // Currently not used
37
37
  showSearch?: boolean;
38
- showFilter?: boolean;
39
- showCustomizationToggle?: boolean;
38
+ showSortToggle?: boolean;
39
+ showFilterToggle?: boolean;
40
40
  }
41
41
 
42
42
  export interface CraftTableProps<T> {