Skip to content

Commit

Permalink
[select] fix(MultiSelect): avoid mutating props.tagInputProps (#6653)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Jan 12, 2024
1 parent c89bb74 commit dd1db7c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/select/src/components/multi-select/multiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ export class MultiSelect<T> extends AbstractPureComponent<MultiSelectProps<T>, M
} = this.props;
const { handleKeyDown, handleKeyUp } = listProps;

if (disabled) {
tagInputProps.disabled = true;
}
if (fill) {
tagInputProps.fill = true;
}

// add our own inputProps.className so that we can reference it in event handlers
const inputProps = {
...tagInputProps.inputProps,
Expand Down Expand Up @@ -311,6 +304,8 @@ export class MultiSelect<T> extends AbstractPureComponent<MultiSelectProps<T>, M
rightElement={maybeClearButton}
{...tagInputProps}
className={classNames(Classes.MULTISELECT, tagInputProps.className)}
disabled={disabled}
fill={fill}
inputRef={this.refHandlers.input}
inputProps={inputProps}
inputValue={listProps.query}
Expand Down

1 comment on commit dd1db7c

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[select] fix(MultiSelect): avoid mutating props.tagInputProps (#6653)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.