Skip to content

Commit 7cea96f

Browse files
committed
prevent render FormHelperText in ArrayInput
1 parent 0fe864d commit 7cea96f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ra-ui-materialui/src/input/ArrayInput/ArrayInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ export const ArrayInput = (props: ArrayInputProps) => {
148148
</Labeled>
149149
);
150150
}
151+
const renderHelperText =
152+
helperText !== false || ((isDirty || isSubmitted) && !!error);
151153

152154
return (
153155
<Root
@@ -186,7 +188,7 @@ export const ArrayInput = (props: ArrayInputProps) => {
186188
disabled,
187189
})}
188190
</ArrayInputContext.Provider>
189-
{!!((isDirty || isSubmitted) && !!error) || helperText ? (
191+
{renderHelperText ? (
190192
<FormHelperText error={(isDirty || isSubmitted) && !!error}>
191193
<InputHelperText
192194
touched={isDirty || isSubmitted}

0 commit comments

Comments
 (0)