Skip to content

Commit 227f50c

Browse files
committed
fix(mui): fix Select prop type warnings.
1 parent 8504872 commit 227f50c

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

packages/common/src/select/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import CreatableSelect from 'react-select/creatable';
66
import PropTypes from 'prop-types';
77
import clsx from 'clsx';
88
import isEqual from 'lodash/isEqual';
9-
import { input } from '../prop-types-templates';
109
import fnToString from '../utils/fn-to-string';
1110
import reducer from './reducer';
1211
import useIsMounted from '../hooks/use-is-mounted';
@@ -169,7 +168,15 @@ Select.propTypes = {
169168
value: PropTypes.any,
170169
placeholder: PropTypes.string,
171170
loadOptionsChangeCounter: PropTypes.number,
172-
...input
171+
isDisabled: PropTypes.bool,
172+
isReadOnly: PropTypes.bool,
173+
loadOptions: PropTypes.func,
174+
loadingMessage: PropTypes.node,
175+
loadingProps: PropTypes.object,
176+
selectVariant: PropTypes.string,
177+
updatingMessage: PropTypes.node,
178+
noOptionsMessage: PropTypes.node,
179+
isSearchable: PropTypes.bool
173180
};
174181

175182
Select.defaultProps = {

packages/mui-component-mapper/src/files/select/integration-select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Option.propTypes = {
158158
*/
159159
innerProps: PropTypes.shape({
160160
id: PropTypes.string.isRequired,
161-
key: PropTypes.string.isRequired,
161+
key: PropTypes.string,
162162
onClick: PropTypes.func.isRequired,
163163
onMouseMove: PropTypes.func.isRequired,
164164
onMouseOver: PropTypes.func.isRequired,
@@ -173,7 +173,7 @@ Option.propTypes = {
173173
PropTypes.shape({
174174
current: PropTypes.any.isRequired
175175
})
176-
]).isRequired,
176+
]),
177177
/**
178178
* Whether the option is focused.
179179
*/
@@ -221,7 +221,7 @@ SingleValue.propTypes = {
221221
/**
222222
* Props passed to the wrapping element for the group.
223223
*/
224-
innerProps: PropTypes.any.isRequired,
224+
innerProps: PropTypes.any,
225225
selectProps: PropTypes.object.isRequired
226226
};
227227

0 commit comments

Comments
 (0)