feat: add missing propTypes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import MuiTextField from '@mui/material/TextField';
|
||||
import CircularProgress from '@mui/material/CircularProgress';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import useDynamicFields from 'hooks/useDynamicFields';
|
||||
import useDynamicData from 'hooks/useDynamicData';
|
||||
@@ -9,11 +10,11 @@ import TextField from 'components/TextField';
|
||||
import ControlledAutocomplete from 'components/ControlledAutocomplete';
|
||||
import ControlledCustomAutocomplete from 'components/ControlledCustomAutocomplete';
|
||||
import DynamicField from 'components/DynamicField';
|
||||
import { FieldPropType } from 'propTypes/propTypes';
|
||||
|
||||
const optionGenerator = (options) =>
|
||||
options?.map(({ name, value }) => ({ label: name, value: value }));
|
||||
|
||||
export default function InputCreator(props) {
|
||||
function InputCreator(props) {
|
||||
const {
|
||||
onChange,
|
||||
onBlur,
|
||||
@@ -131,7 +132,8 @@ export default function InputCreator(props) {
|
||||
<React.Fragment>
|
||||
<PowerInput
|
||||
key={computedName}
|
||||
label={label}
|
||||
// label={label}
|
||||
label="PowerInput"
|
||||
description={description}
|
||||
name={computedName}
|
||||
required={required}
|
||||
@@ -204,3 +206,16 @@ export default function InputCreator(props) {
|
||||
}
|
||||
return <React.Fragment />;
|
||||
}
|
||||
|
||||
InputCreator.propTypes = {
|
||||
onChange: PropTypes.func,
|
||||
onBlur: PropTypes.func,
|
||||
schema: FieldPropType.isRequired,
|
||||
namePrefix: PropTypes.string,
|
||||
stepId: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
showOptionValue: PropTypes.bool,
|
||||
shouldUnregister: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default InputCreator;
|
||||
|
Reference in New Issue
Block a user