trithuc-mvc-react 3.0.6 → 3.0.7

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.
@@ -15,7 +15,6 @@ import { TableRowRender } from "./TableRowRender";
15
15
  import TableToolbar from "./TableToolbar";
16
16
  import { useDataTable } from "./hooks";
17
17
  const defaultQueryOptions = {
18
- keepPreviousData: true, // Giữ dữ liệu cũ trong khi tải dữ liệu mới
19
18
  staleTime: 1000 * 60 * 1, // Thời gian dữ liệu có thể sử dụng lại trước khi gọi lại API
20
19
  cacheTime: 1000 * 60 * 30, // Thời gian dữ liệu được lưu trong cache trước khi bị xóa
21
20
  refetchOnWindowFocus: true, // Tự động lấy lại dữ liệu khi người dùng quay lại tab
@@ -181,8 +181,8 @@ export const FilterGod = ({ tableName, filters, elementSize = "small", setPage =
181
181
  );
182
182
  }
183
183
  return (
184
- <Grid key={field} md={size?.md} xs={size?.xs} sm={size?.sm}>
185
- <FilterElement name={field} {...rest} setPage={setPage} />
184
+ <Grid key={field.toString()} md={size?.md} xs={size?.xs} sm={size?.sm}>
185
+ <FilterElement name={field.toString()} {...rest} setPage={setPage} />
186
186
  </Grid>
187
187
  );
188
188
  })}
@@ -27,7 +27,7 @@ DataManagement.propTypes = {
27
27
  filters: PropTypes.arrayOf(
28
28
  PropTypes.shape({
29
29
  field: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).isRequired,
30
- label: PropTypes.string,
30
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), // Hỗ trợ cả chuỗi và mảng chuỗi
31
31
  placeHolder: PropTypes.string,
32
32
  type: PropTypes.oneOf([
33
33
  "text",
@@ -46,6 +46,7 @@ DataManagement.propTypes = {
46
46
  onChangeAfter: PropTypes.func
47
47
  })
48
48
  ).isRequired,
49
+
49
50
  editorFields: PropTypes.array,
50
51
  validationSchema: PropTypes.object,
51
52
  disableStatus: PropTypes.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trithuc-mvc-react",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "description": "",
15
15
  "dependencies": {
16
- "@emotion/react": "^11.13.3",
17
- "@emotion/styled": "^11.13.0",
16
+ "@emotion/react": "^11.13.5",
17
+ "@emotion/styled": "^11.13.5",
18
18
  "@hookform/resolvers": "^3.9.1",
19
19
  "@iconify/react": "^5.0.2",
20
20
  "axios": "^1.7.7",
21
- "date-fns": "^2.17.0",
21
+ "date-fns": "^3.6.0",
22
22
  "lodash": "^4.17.21",
23
23
  "moment": "^2.30.1",
24
24
  "prop-types": "^15.8.1",
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "@types/react": "^18.3.12",
29
29
  "@types/react-dom": "^18.3.1",
30
- "eslint": "^9.14.0",
30
+ "eslint": "^9.15.0",
31
31
  "eslint-plugin-react": "^7.37.2",
32
32
  "eslint-plugin-react-hooks": "^5.0.0",
33
33
  "eslint-plugin-react-refresh": "^0.4.14",
@@ -35,15 +35,16 @@
35
35
  "react-dom": "^18.3.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@mui/icons-material": "^5.15.12",
39
38
  "@mui/lab": "^5.0.0-alpha.142",
40
39
  "@mui/material": "^5.15.12",
41
- "@mui/x-date-pickers": "^6.10.2",
40
+ "@mui/system": "^5.15.12",
41
+ "@mui/icons-material": "^5.15.12",
42
42
  "@mui/x-tree-view": "^7.22.1",
43
- "material-ui-confirm": "^3.0.9",
43
+ "@mui/x-date-pickers": "^6.19.6",
44
+ "material-ui-confirm": "^3.0.16",
44
45
  "react": ">=16",
45
46
  "react-dom": ">=16",
46
- "react-hook-form": "^7.45.2",
47
+ "react-hook-form": "^7.53.2",
47
48
  "react-query": "^3.39.3",
48
49
  "react-toastify": "^10.0.6",
49
50
  "dayjs": "^1.11.13"