Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/select-input/useMultiple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export default function useMultiple(props: SelectInputProps) {
if (context?.trigger === 'enter' || context?.trigger === 'blur') return;
setTInputValue(val, { trigger: context.trigger, e: context.e });
}}
tagProps={props.tagProps}
onClear={p.onInnerClear}
// [Important Info]: SelectInput.blur is not equal to TagInput, example: click popup panel
onFocus={handleFocus}
onBlur={handleBlur}
{...props.tagInputProps}
tagProps={{ ...props.tagProps, ...props.tagInputProps?.tagProps }}
inputProps={{
...props.inputProps,
readOnly: !props.allowInput || readOnly,
Expand Down
6 changes: 5 additions & 1 deletion packages/components/tag-input/useTagList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,19 @@ export default function useTagList(props: TagInputProps) {
? [<Fragment key="display-node">{displayNode}</Fragment>]
: newList?.map((item, index) => {
const tagContent = isFunction(tag) ? tag({ value: item }) : tag;
const handleClose = (context) => {
tagProps?.onClose?.(context);
onClose({ e: context?.e, index });
};
return (
<Tag
key={index}
size={size}
disabled={disabled}
onClose={(context) => onClose({ e: context.e, index })}
closable={!readOnly && !disabled}
{...getDragProps?.(index, item)}
{...tagProps}
onClose={handleClose}
>
{tagContent ?? item}
</Tag>
Expand Down
Loading