@@ -3,23 +3,20 @@ import { components } from 'react-select';
33import PropTypes from 'prop-types' ;
44import clsx from 'clsx' ;
55
6- const Option = props => {
7- return (
8- < div className = { clsx ( 'ddorg__pf3-component-mapper__select__option' , {
9- 'ddorg__pf3-component-mapper__select__option--is-focused' : props . isFocused ,
10- 'ddorg__pf3-component-mapper__select__option--is-selected' : props . isSelected ,
11- } ) } >
12- < components . Option { ...props } />
13- { props . isSelected && ( props . selectProps && ! props . selectProps . isCheckbox ) && < i className = "selected-indicator fa fa-check" > </ i > }
14- </ div >
15- ) ;
16- } ;
6+ const Option = props => (
7+ < div className = { clsx ( 'ddorg__pf3-component-mapper__select__option' , {
8+ 'ddorg__pf3-component-mapper__select__option--is-focused' : props . isFocused ,
9+ 'ddorg__pf3-component-mapper__select__option--is-selected' : props . isSelected ,
10+ } ) } >
11+ < components . Option { ...props } />
12+ { props . isSelected && ( props . selectProps && ! props . selectProps . isCheckbox ) && < i className = "selected-indicator fa fa-check" > </ i > }
13+ </ div >
14+ ) ;
1715
1816Option . propTypes = {
1917 isFocused : PropTypes . bool ,
2018 isSelected : PropTypes . bool ,
2119 getStyles : PropTypes . func . isRequired ,
22- selectOption : PropTypes . func ,
2320 cx : PropTypes . func . isRequired ,
2421 data : PropTypes . shape ( {
2522 selected : PropTypes . bool ,
@@ -35,7 +32,6 @@ Option.propTypes = {
3532Option . defaultProps = {
3633 isFocused : false ,
3734 isSelected : false ,
38- selectOption : ( ) => undefined ,
3935 selectProps : {
4036 isCheckbox : false ,
4137 } ,
0 commit comments