trithuc-mvc-react 2.3.4 → 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.
|
@@ -10,8 +10,18 @@ import MoreMenu from "../MoreMenu";
|
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
|
|
12
12
|
export const TableRowRender = ({ index, row, selected, onSelect, onChangeStatus, onDelete, onEdit, onView }) => {
|
|
13
|
-
const {
|
|
14
|
-
|
|
13
|
+
const {
|
|
14
|
+
selectedField,
|
|
15
|
+
columns,
|
|
16
|
+
page,
|
|
17
|
+
rowsPerPage,
|
|
18
|
+
statusKey,
|
|
19
|
+
disableStatus,
|
|
20
|
+
tableActions,
|
|
21
|
+
disableCellThaoTac,
|
|
22
|
+
tableName,
|
|
23
|
+
sttLuyKe
|
|
24
|
+
} = useDataTable();
|
|
15
25
|
const { canEdit, canDelete, canView, canAction } = usePermission(tableName);
|
|
16
26
|
|
|
17
27
|
console.log(">>> useDataTable()", useDataTable());
|
|
@@ -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,7 +152,9 @@ 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) });
|
|
@@ -208,7 +214,6 @@ function DataManagement({
|
|
|
208
214
|
{tabPanel}
|
|
209
215
|
<FilterGod filters={filters} elementSize={elementSize} />
|
|
210
216
|
{backParentNavigator}
|
|
211
|
-
{console.log(">>> tnduc", backParentNavigator)}
|
|
212
217
|
<DataTable multipleActions={multipleActions} />
|
|
213
218
|
</Card>
|
|
214
219
|
</FormProvider>
|