Revert "Release/2026 02 27 (pull request #3070)"
This commit is contained in:
@@ -184,29 +184,22 @@ export default function GlobalSearchOs() {
|
||||
return (
|
||||
<AutoComplete
|
||||
options={data}
|
||||
defaultActiveFirstOption
|
||||
onSearch={handleSearch}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key !== "Enter") return;
|
||||
const firstUrlForSearch = data?.[0]?.options?.[0]?.label?.props?.to;
|
||||
if (!firstUrlForSearch) return;
|
||||
navigate(firstUrlForSearch);
|
||||
}}
|
||||
defaultActiveFirstOption
|
||||
onClear={() => setData([])}
|
||||
>
|
||||
<Input.Search
|
||||
// className="global-search-autocomplete-fix"
|
||||
size="large"
|
||||
placeholder={t("general.labels.globalsearch")}
|
||||
enterButton
|
||||
allowClear
|
||||
loading={loading}
|
||||
onChange={(e) => {
|
||||
const value = e.target.value;
|
||||
if (!value) {
|
||||
setData([]);
|
||||
} else {
|
||||
handleSearch(value);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</AutoComplete>
|
||||
);
|
||||
|
||||
@@ -160,6 +160,9 @@ export default function GlobalSearch() {
|
||||
return (
|
||||
<AutoComplete
|
||||
options={options}
|
||||
showSearch={{
|
||||
onSearch: handleSearch
|
||||
}}
|
||||
defaultActiveFirstOption
|
||||
onKeyDown={(e) => {
|
||||
if (e.key !== "Enter") return;
|
||||
@@ -169,13 +172,11 @@ export default function GlobalSearch() {
|
||||
}}
|
||||
>
|
||||
<Input.Search
|
||||
// className="global-search-autocomplete-fix"
|
||||
size="large"
|
||||
placeholder={t("general.labels.globalsearch")}
|
||||
enterButton
|
||||
allowClear
|
||||
loading={loading}
|
||||
onChange={(e) => handleSearch(e.target.value)}
|
||||
/>
|
||||
</AutoComplete>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user