mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Reference picker: fix show existing key as unexistent in Insert mode
This commit is contained in:
+3
-2
@@ -109,9 +109,10 @@ export default function ReferencePickerModal({
|
|||||||
|
|
||||||
setResults(r.hits)
|
setResults(r.hits)
|
||||||
|
|
||||||
|
const known = new Set(r.hits.map(h => h._source.EntryKey))
|
||||||
|
setKnownKeys(known)
|
||||||
|
|
||||||
if (pendingInitialKeysRef.current.length > 0) {
|
if (pendingInitialKeysRef.current.length > 0) {
|
||||||
const known = new Set(r.hits.map(h => h._source.EntryKey))
|
|
||||||
setKnownKeys(known)
|
|
||||||
setSelectedKeys([...pendingInitialKeysRef.current])
|
setSelectedKeys([...pendingInitialKeysRef.current])
|
||||||
pendingInitialKeysRef.current = []
|
pendingInitialKeysRef.current = []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user