Skip to content
This repository was archived by the owner on Dec 23, 2022. It is now read-only.

Commit 779dd96

Browse files
committed
Fix focused chips not being highlighted if chips are objects.
Fixes #77
1 parent 3930ee7 commit 779dd96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ChipInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ class ChipInput extends React.Component {
493493
value,
494494
text: dataSourceConfig ? tag[dataSourceConfig.text] : tag,
495495
isDisabled: disabled,
496-
isFocused: this.state.focusedChip === value,
496+
isFocused: dataSourceConfig ? (this.state.focusedChip && this.state.focusedChip[dataSourceConfig.value] === value) : (this.state.focusedChip === value),
497497
handleClick: () => this.setState({ focusedChip: value }),
498498
handleRequestDelete: () => this.handleDeleteChip(value, i),
499499
defaultStyle: styles.defaultChip

0 commit comments

Comments
 (0)