next-helios-fe 1.6.10 → 1.6.12
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.
package/package.json
CHANGED
@@ -92,9 +92,15 @@ export const Autocomplete: React.FC<AutocompleteProps> = ({
|
|
92
92
|
useEffect(() => {
|
93
93
|
if (rest.value || rest.value === "") {
|
94
94
|
setTempValue(rest.value as string);
|
95
|
+
setTempFilter(
|
96
|
+
menus.find((item) => item.value === rest.value)?.label as string
|
97
|
+
);
|
95
98
|
return;
|
96
99
|
} else if (rest.defaultValue || rest.defaultValue === "") {
|
97
100
|
setTempValue(rest.defaultValue as string);
|
101
|
+
setTempFilter(
|
102
|
+
menus.find((item) => item.value === rest.defaultValue)?.label as string
|
103
|
+
);
|
98
104
|
return;
|
99
105
|
}
|
100
106
|
}, [rest.value, rest.defaultValue]);
|
@@ -130,7 +136,7 @@ export const Autocomplete: React.FC<AutocompleteProps> = ({
|
|
130
136
|
placeholder={placeholder}
|
131
137
|
required={rest.required}
|
132
138
|
disabled={rest.disabled}
|
133
|
-
value={tempFilter}
|
139
|
+
value={tempFilter || ""}
|
134
140
|
onChange={(e) => {
|
135
141
|
setTempFilter(e.target.value);
|
136
142
|
}}
|