@@ -11,7 +11,7 @@ import './select-styles.scss';
1111import Input from './input' ;
1212import Menu from './menu' ;
1313
14- const InternalSelect = ( { onChange, options, value, simpleValue, placeholder, isSearchable, ...props } ) => {
14+ const InternalSelect = ( { onChange, options, value, simpleValue, placeholder, isSearchable, isDisabled , ...props } ) => {
1515 // console.log(props);
1616 const inputRef = useRef ( ) ;
1717 const parsedValue = parseInternalValue ( value ) ;
@@ -37,9 +37,18 @@ const InternalSelect = ({ onChange, options, value, simpleValue, placeholder, is
3737 } ;
3838 return (
3939 < div className = "pf-c-select" >
40- < button className = " pf-c-select__toggle" { ...enhancedToggleButtonProps } >
40+ < button disabled = { isDisabled } className = { ` pf-c-select__toggle${ isDisabled ? ' pf-m-disabled' : '' } ` } { ...enhancedToggleButtonProps } >
4141 < div className = "pf-c-select_toggle-wrapper ddorg__pf4-component-mapper__select-toggle-wrapper" >
42- < Input inputRef = { inputRef } placeholder = { placeholder } className = "pf-c-select_toggle-text" { ...getInputProps ( ) } value = { value } />
42+ < Input
43+ inputRef = { inputRef }
44+ isSearchable = { isSearchable }
45+ placeholder = { placeholder }
46+ className = "pf-c-select_toggle-text"
47+ { ...getInputProps ( {
48+ disabled : isDisabled
49+ } ) }
50+ value = { value }
51+ />
4352 </ div >
4453 < span className = "pf-c-select__toggle-arrow" >
4554 < CaretDownIcon />
@@ -66,8 +75,9 @@ InternalSelect.propTypes = {
6675 placeholder : PropTypes . string ,
6776 isSearchable : PropTypes . bool ,
6877 id : PropTypes . string ,
69- name : PropTypes . string . isRequired
70- }
78+ name : PropTypes . string . isRequired ,
79+ isDisabled : PropTypes . bool
80+ } ;
7181
7282const Select = ( { selectVariant, menuIsPortal, ...props } ) => {
7383 const isSearchable = selectVariant === 'createable' || props . isSearchable ;
0 commit comments