fix: tag input state lost issue (#7500)

This commit is contained in:
Yi Xiao 2024-08-22 10:26:09 +08:00 committed by GitHub
parent 0006c6f0fd
commit 9f6aab11d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,6 +68,7 @@ const Panel = (props: PanelProps) => {
...tagList,
newTag,
])
setKeywords('')
setCreating(false)
onCreate()
}
@ -123,11 +124,8 @@ const Panel = (props: PanelProps) => {
handleValueChange()
})
const onMouseLeave = async () => {
props.onClose?.()
}
return (
<div className='relative w-full bg-white rounded-lg border-[0.5px] border-gray-200' onMouseLeave={onMouseLeave}>
<div className='relative w-full bg-white rounded-lg border-[0.5px] border-gray-200'>
<div className='p-2 border-b-[0.5px] border-black/5'>
<SearchInput placeholder={t('common.tag.selectorPlaceholder') || ''} white value={keywords} onChange={handleKeywordsChange} />
</div>