trithuc-mvc-react 3.2.1 → 3.2.3

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.
@@ -9,6 +9,7 @@ export function FilterElement({
9
9
  name,
10
10
  type,
11
11
  label,
12
+ placeholder,
12
13
  keyValue,
13
14
  keyLabel,
14
15
  childrenFields,
@@ -43,6 +44,7 @@ export function FilterElement({
43
44
  return (
44
45
  <TextField
45
46
  {...rest}
47
+ label={label}
46
48
  fullWidth
47
49
  value={value ?? ""}
48
50
  onChange={(e) => {
@@ -50,7 +52,7 @@ export function FilterElement({
50
52
  handleFilterChangeDebounce(name, e.target.value);
51
53
  setPage(0);
52
54
  }}
53
- placeholder={label}
55
+ placeholder={placeholder}
54
56
  variant="outlined"
55
57
  InputProps={{
56
58
  startAdornment: (
@@ -98,7 +100,7 @@ export function FilterElement({
98
100
  }}
99
101
  value={autocompleteValue}
100
102
  getOptionLabel={(option) => option?.[keyLabel]}
101
- renderInput={(params) => <TextField {...params} label={label} />}
103
+ renderInput={(params) => <TextField {...params} label={label} placeholder={placeholder} />}
102
104
  />
103
105
  );
104
106
  }
@@ -112,6 +114,7 @@ export function FilterElement({
112
114
  fullWidth
113
115
  size={size}
114
116
  label={label}
117
+ placeholder={placeholder}
115
118
  value={value}
116
119
  displayEmpty
117
120
  onChange={(e) => {
@@ -54,7 +54,7 @@ export const FilterGod = ({ tableName, filters, filterButtons, elementSize = "sm
54
54
 
55
55
  <AccordionDetails>
56
56
  <Grid container spacing={1}>
57
- {filters.map(({ field, label, size, ...rest }) => {
57
+ {filters.map(({ field, label, placeHolder, size, ...rest }) => {
58
58
  if (rest.type === "date-range") {
59
59
  const [label1, label2] = Array.isArray(label) ? label : ["Từ ngày", "Đến ngày"];
60
60
  const handleClear = (key) => {
@@ -183,7 +183,7 @@ export const FilterGod = ({ tableName, filters, filterButtons, elementSize = "sm
183
183
  }
184
184
  return (
185
185
  <Grid key={field.toString()} size={{ ...size }}>
186
- <FilterElement name={field.toString()} {...rest} setPage={setPage} />
186
+ <FilterElement name={field.toString()} label={label} placeholder={placeHolder} {...rest} setPage={setPage} />
187
187
  </Grid>
188
188
  );
189
189
  })}
@@ -60,21 +60,21 @@ function TablePaginationCustom({ count, rowsPerPage, page, onPageChange, onRowsP
60
60
  display: "flex",
61
61
  flexWrap: "wrap", // Cho xuống dòng nếu không đủ chỗ
62
62
  justifyContent: "space-between",
63
- paddingLeft: "6px",
64
- paddingRight: "6px",
65
- gap: "4px", // Giảm khoảng cách
63
+ paddingLeft: "4px",
64
+ paddingRight: "4px",
65
+ gap: "2px", // Giảm khoảng cách
66
66
  minHeight: "auto"
67
67
  },
68
68
  "& .MuiTablePagination-selectLabel, & .MuiTablePagination-displayedRows": {
69
- fontSize: "0.65rem"
69
+ fontSize: "0.53rem"
70
70
  },
71
71
  "& .MuiTablePagination-select": {
72
- fontSize: "0.65rem",
73
- minWidth: "50px"
72
+ fontSize: "0.53rem",
73
+ minWidth: "45px"
74
74
  },
75
75
  "& .MuiTablePagination-actions > button": {
76
- fontSize: "0.7rem",
77
- minWidth: "24px",
76
+ fontSize: "0.53rem",
77
+ minWidth: "20px",
78
78
  padding: "2px"
79
79
  }
80
80
  }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trithuc-mvc-react",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"