trithuc-mvc-react 2.3.3 → 2.3.5
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.
|
@@ -13,17 +13,18 @@ export const TableRowRender = ({ index, row, selected, onSelect, onChangeStatus,
|
|
|
13
13
|
const {
|
|
14
14
|
selectedField,
|
|
15
15
|
columns,
|
|
16
|
+
page,
|
|
17
|
+
rowsPerPage,
|
|
16
18
|
statusKey,
|
|
17
19
|
disableStatus,
|
|
18
20
|
tableActions,
|
|
19
21
|
disableCellThaoTac,
|
|
20
22
|
tableName,
|
|
21
|
-
sttLuyKe
|
|
22
|
-
backParentNavigator
|
|
23
|
+
sttLuyKe
|
|
23
24
|
} = useDataTable();
|
|
24
25
|
const { canEdit, canDelete, canView, canAction } = usePermission(tableName);
|
|
25
26
|
|
|
26
|
-
console.log(">>>
|
|
27
|
+
console.log(">>> useDataTable()", useDataTable());
|
|
27
28
|
const { tableActionsOnTable, tableActionsOnMoreMenu } = useMemo(() => {
|
|
28
29
|
const tableActionsAfterFilter = [...tableActions]
|
|
29
30
|
.filter((x) => x)
|
|
@@ -78,7 +78,9 @@ function DataManagement({
|
|
|
78
78
|
sx: {}
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
defaultRowsPerPage = 5
|
|
81
|
+
defaultRowsPerPage = 5,
|
|
82
|
+
page = 0,
|
|
83
|
+
rowsPerPage = defaultRowsPerPage
|
|
82
84
|
}) {
|
|
83
85
|
const [openEditorDialog, setOpenEditorDialog] = useState(false);
|
|
84
86
|
const [selectedEditItem, setSelectedEditItem] = useState(null);
|
|
@@ -131,7 +133,9 @@ function DataManagement({
|
|
|
131
133
|
onEditClick,
|
|
132
134
|
hasTabpanel,
|
|
133
135
|
backParentNavigator,
|
|
134
|
-
defaultRowsPerPage
|
|
136
|
+
defaultRowsPerPage,
|
|
137
|
+
page,
|
|
138
|
+
rowsPerPage
|
|
135
139
|
};
|
|
136
140
|
}, [
|
|
137
141
|
sttLuyKe,
|
|
@@ -148,12 +152,13 @@ function DataManagement({
|
|
|
148
152
|
setOpenViewDialog,
|
|
149
153
|
onEditClick,
|
|
150
154
|
backParentNavigator,
|
|
151
|
-
defaultRowsPerPage
|
|
155
|
+
defaultRowsPerPage,
|
|
156
|
+
page,
|
|
157
|
+
rowsPerPage
|
|
152
158
|
]);
|
|
153
159
|
|
|
154
160
|
const methods = useForm({ defaultValues: getDefaultValues(filters) });
|
|
155
161
|
const { reset, setValue } = methods;
|
|
156
|
-
console.log("tnduc", backParentNavigator);
|
|
157
162
|
return (
|
|
158
163
|
<>
|
|
159
164
|
<DataTableContext.Provider value={values}>
|
|
@@ -209,7 +214,6 @@ function DataManagement({
|
|
|
209
214
|
{tabPanel}
|
|
210
215
|
<FilterGod filters={filters} elementSize={elementSize} />
|
|
211
216
|
{backParentNavigator}
|
|
212
|
-
|
|
213
217
|
<DataTable multipleActions={multipleActions} />
|
|
214
218
|
</Card>
|
|
215
219
|
</FormProvider>
|