mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
vmui: preserve Select value if it matches list on blur (#6101)
This commit is contained in:
parent
256c561005
commit
e4d6ded0f5
2 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,10 @@ const Select: FC<SelectProps> = ({
|
||||||
setOpenList(true);
|
setOpenList(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleBlur = () => {
|
||||||
|
list.includes(search) && onChange(search);
|
||||||
|
};
|
||||||
|
|
||||||
const handleToggleList = (e: MouseEvent<HTMLDivElement>) => {
|
const handleToggleList = (e: MouseEvent<HTMLDivElement>) => {
|
||||||
if (e.target instanceof HTMLInputElement || disabled) return;
|
if (e.target instanceof HTMLInputElement || disabled) return;
|
||||||
setOpenList(prev => !prev);
|
setOpenList(prev => !prev);
|
||||||
|
@ -142,6 +146,7 @@ const Select: FC<SelectProps> = ({
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
onInput={handleChange}
|
onInput={handleChange}
|
||||||
onFocus={handleFocus}
|
onFocus={handleFocus}
|
||||||
|
onBlur={handleBlur}
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
readOnly={isMobile || !searchable}
|
readOnly={isMobile || !searchable}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -30,6 +30,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/).
|
||||||
|
|
||||||
## tip
|
## tip
|
||||||
|
|
||||||
|
* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): in the Select component, user-entered values are now preserved on blur if they match options in the list.
|
||||||
* FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth/): support regex matching when routing incoming requests based on HTTP [query args](https://en.wikipedia.org/wiki/Query_string) via `src_query_args` option at `url_map`. See [these docs](https://docs.victoriametrics.com/vmauth/#generic-http-proxy-for-different-backends) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6070).
|
* FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth/): support regex matching when routing incoming requests based on HTTP [query args](https://en.wikipedia.org/wiki/Query_string) via `src_query_args` option at `url_map`. See [these docs](https://docs.victoriametrics.com/vmauth/#generic-http-proxy-for-different-backends) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6070).
|
||||||
|
|
||||||
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): supported any status codes from the range 200-299 from alertmanager. Previously, only 200 status code considered a successful action. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6110).
|
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): supported any status codes from the range 200-299 from alertmanager. Previously, only 200 status code considered a successful action. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6110).
|
||||||
|
|
Loading…
Reference in a new issue