Skip to content

Commit b86acdd

Browse files
committed
fix lint
1 parent a38ebfa commit b86acdd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/components/form/element/combobox.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ class Combobox extends React.Component {
220220
if (optionsChanged || alreadySelectedChanged) {
221221
// If only alreadySelectedOptions changed and dropdown is open, just update options without resetting
222222
if (!optionsChanged && alreadySelectedChanged && this.state.isDropdownOpen) {
223-
this.setState({
224-
options: this.getTruncatedOptions(this.state.currentValue, nextProps.alreadySelectedOptions),
225-
});
223+
const {currentValue} = this.state;
224+
this.setState(() => ({
225+
options: this.getTruncatedOptions(currentValue, nextProps.alreadySelectedOptions),
226+
}));
226227
} else {
227228
// Options changed or dropdown is closed - do full reset
228229
this.reset(false, nextProps.options, nextProps.alreadySelectedOptions);

0 commit comments

Comments
 (0)