Skip to content

Commit

Permalink
Fix props injection / double underline bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nighto committed Nov 21, 2024
1 parent 3c3c801 commit 9fc11a6
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ export const InputFieldWithTags = (props: InputFieldWithTagsProps) => {
const controlId = React.useId();
const formContext = useFormContext();

const injectedInputProps = {
...inputProps,
unstyled: tags && tags.length > 0,
};

const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
// first handle supplied onChange, if exists
if (inputProps.onChange) {
Expand Down Expand Up @@ -121,7 +116,8 @@ export const InputFieldWithTags = (props: InputFieldWithTagsProps) => {
tags.map((tag, idx) => <Tag key={idx} content={tag} onRemove={() => onRemoveTag(idx)}/>)
)}
<Input
{...injectedInputProps}
{...inputProps}
unstyled={true}
id={controlId}
form={formContext.formId}
className={cx(cl['bk-input-field-with-tags__control'], inputProps.className)}
Expand Down

0 comments on commit 9fc11a6

Please sign in to comment.