Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonals committed Jun 24, 2024
1 parent a645f85 commit 9d8b39b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/components/form/element/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class Combobox extends React.Component {

const formatOption = (option) => ({
focused: false,
isSelected: option.selected && (isEqual(option.value, currentValue) || !!(alreadySelected.find((item) => item.value === option.value))),
isSelected: option.selected && (isEqual(option.value, currentValue) || !!alreadySelected.find((item) => item.value === option.value)),
...option,
});

Expand Down Expand Up @@ -551,7 +551,7 @@ class Combobox extends React.Component {
const deselectOption = (initialOption) => {
const option = initialOption;
const isSelected = isEqual(option.value, val);
option.isSelected = isSelected || !!(this.props.alreadySelectedOptions.find((optionItem) => optionItem.value === option.value));
option.isSelected = isSelected || !!this.props.alreadySelectedOptions.find((optionItem) => optionItem.value === option.value);

return option;
};
Expand Down Expand Up @@ -859,8 +859,7 @@ class Combobox extends React.Component {
const formatOption = (option) => ({
focused: false,
isSelected:
isEqual(option.value ? option.value.toUpperCase : '', value.toUpperCase()) ||
!!(this.props.alreadySelectedOptions.find((optionItem) => optionItem.value === option.value)),
isEqual(option.value ? option.value.toUpperCase : '', value.toUpperCase()) || !!this.props.alreadySelectedOptions.find((optionItem) => optionItem.value === option.value),
...option,
});

Expand Down

0 comments on commit 9d8b39b

Please sign in to comment.