mirror of
https://github.com/outline/outline.git
synced 2026-12-03 10:00:13 +03:00
fix: Prevent update loop in link editor search on focus (#13840)
Fixes OUTLINE-CLOUD-D7M
This commit is contained in:
1 parent
70ea374543
commit
8db64ddb04
1 file changed
+4
-1
@@ -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);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user