fix: ensures arrays and blocks mount as disableFormData: true, fixes #1242
This commit is contained in:
@@ -76,7 +76,7 @@ const ArrayFieldType: React.FC<Props> = (props) => {
|
|||||||
return validate(value, { ...options, minRows, maxRows, required });
|
return validate(value, { ...options, minRows, maxRows, required });
|
||||||
}, [maxRows, minRows, required, validate]);
|
}, [maxRows, minRows, required, validate]);
|
||||||
|
|
||||||
const [disableFormData, setDisableFormData] = useState(false);
|
const [disableFormData, setDisableFormData] = useState(true);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
showError,
|
showError,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const labelDefaults = {
|
|||||||
plural: 'Blocks',
|
plural: 'Blocks',
|
||||||
};
|
};
|
||||||
|
|
||||||
const Index: React.FC<Props> = (props) => {
|
const BlocksField: React.FC<Props> = (props) => {
|
||||||
const {
|
const {
|
||||||
label,
|
label,
|
||||||
name,
|
name,
|
||||||
@@ -76,7 +76,7 @@ const Index: React.FC<Props> = (props) => {
|
|||||||
return validate(value, { ...options, minRows, maxRows, required });
|
return validate(value, { ...options, minRows, maxRows, required });
|
||||||
}, [maxRows, minRows, required, validate]);
|
}, [maxRows, minRows, required, validate]);
|
||||||
|
|
||||||
const [disableFormData, setDisableFormData] = useState(false);
|
const [disableFormData, setDisableFormData] = useState(true);
|
||||||
const [selectorIndexOpen, setSelectorIndexOpen] = useState<number>();
|
const [selectorIndexOpen, setSelectorIndexOpen] = useState<number>();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -419,4 +419,4 @@ const Index: React.FC<Props> = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withCondition(Index);
|
export default withCondition(BlocksField);
|
||||||
|
|||||||
Reference in New Issue
Block a user