fix tags input returns [""] instead of [] when empty
This commit is contained in:
@@ -65,6 +65,9 @@ function _TagsInput({ ref }: { ref: React.Ref<TagsInputRef> }) {
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
get tags() {
|
||||
if (value === "") {
|
||||
return []
|
||||
}
|
||||
return value.trim().split(" ")
|
||||
},
|
||||
input: refs.reference.current,
|
||||
|
Reference in New Issue
Block a user