fix: Prevent update loop in link editor search on focus (#13840)

Fixes OUTLINE-CLOUD-D7M
This commit is contained in:
Tom Moor authored and GitHub committed 2026-09-21 21:50:58 -04:00
1 parent 70ea374543
commit 8db64ddb04
1 file changed
+4 -1
+4 -1
View File
@@ -180,8 +180,11 @@ const LinkEditor: React.FC<Props> = ({
}
};
const handleSearch = async (event: React.ChangeEvent<HTMLInputElement>) => {
const handleSearch = (event: React.ChangeEvent<HTMLInputElement>) => {
const newValue = event.target.value;
if (newValue === query) {
return;
}
setQuery(newValue);
setSelectedIndex(-1);
};