trithuc-mvc-react 3.2.2 → 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={
|
|
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
|
})}
|