Skip to content

Commit

Permalink
Merge pull request scandipwa#5265 from AleksandrsKondratjevs/issue-5239
Browse files Browse the repository at this point in the history
issue-5239 - Fix selecting option for field select
  • Loading branch information
AleksandrsKondratjevs authored Oct 31, 2022
2 parents 22489de + accffbe commit f3667fc
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,15 @@ export class FieldSelectComponent extends PureComponent<FieldSelectComponentProp
options,
handleSelectListOptionClick,
isSelectedOptionAvailable,
value,
} = this.props;

const { value: placeholder } = options.find(({ isPlaceholder }) => isPlaceholder) || {};

return (
<select
block="FieldSelect"
elem="Select"
mods={ { isDisabled: !isSelectedOptionAvailable } }
ref={ (elem) => setRef(elem) }
disabled={ isDisabled }
value={ value || placeholder }
// eslint-disable-next-line @scandipwa/scandipwa-guidelines/jsx-no-props-destruction
{ ...attr }
// eslint-disable-next-line @scandipwa/scandipwa-guidelines/jsx-no-props-destruction
Expand Down

0 comments on commit f3667fc

Please sign in to comment.