Skip to content

Commit

Permalink
feat: add className and style to tagInput
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepluo committed Feb 25, 2022
1 parent a3bdc0a commit 666f64b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/select-input/useSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function useSingle(props: TdSelectInputProps) {
) => {
if (props.allowInput) {
setInputValue(value);
props.onInputChange?.(value, context);
props.onInputChange?.(value, { ...context, trigger: 'input' });
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/tag-input/TagInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const TagInput = forwardRef((props: TagInputProps, ref) => {
{
[BREAK_LINE_CLASS]: excessTagsDisplayType === 'break-line',
},
props.className,
];

const tagInputPlaceholder = isHover || !tagValue?.length ? placeholder : '';
Expand Down Expand Up @@ -115,6 +116,7 @@ const TagInput = forwardRef((props: TagInputProps, ref) => {
disabled={disabled}
label={() => renderLabel({ displayNode, label })}
className={classnames(classes)}
style={props.style}
tips={tips}
status={status}
placeholder={tagInputPlaceholder}
Expand Down

0 comments on commit 666f64b

Please sign in to comment.