Skip to content

Commit 2d5d2a3

Browse files
committed
added paste case too
1 parent 8690489 commit 2d5d2a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/sim/components/emcn/components/tag-input/tag-input.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,12 @@ const TagInput = React.forwardRef<HTMLInputElement, TagInputProps>(
347347
})
348348

349349
if (addedCount === 0 && pastedValues.length === 1) {
350-
setInputValue(inputValue + pastedValues[0])
350+
const newValue = inputValue + pastedValues[0]
351+
setInputValue(newValue)
352+
onInputChange?.(newValue)
351353
}
352354
},
353-
[onAdd, inputValue]
355+
[onAdd, inputValue, onInputChange]
354356
)
355357

356358
const handleBlur = React.useCallback(() => {

0 commit comments

Comments
 (0)