fix tag autocomplete list not hiding on blur
This commit is contained in:
@@ -53,6 +53,7 @@ function AddBookmarkDialog() {
|
||||
},
|
||||
Escape: () => {
|
||||
linkInputRef.current?.blur()
|
||||
tagsInputRef.current?.blur()
|
||||
},
|
||||
},
|
||||
{ ignore: () => false },
|
||||
@@ -158,7 +159,6 @@ function TagsInput({ ref }: { ref: React.Ref<HTMLInputElement | null> }) {
|
||||
},
|
||||
}),
|
||||
],
|
||||
open: isInputFocused && lastTag !== "",
|
||||
})
|
||||
|
||||
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(ref, () => refs.reference.current)
|
||||
@@ -183,7 +183,7 @@ function TagsInput({ ref }: { ref: React.Ref<HTMLInputElement | null> }) {
|
||||
}}
|
||||
labelClassName="bg-stone-300 dark:bg-stone-800"
|
||||
/>
|
||||
<TagList ref={refs.setFloating} style={floatingStyles} />
|
||||
{isInputFocused && lastTag !== "" ? <TagList ref={refs.setFloating} style={floatingStyles} /> : null}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user