We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abb5f92 commit 0fe864dCopy full SHA for 0fe864d
1 file changed
packages/ra-ui-materialui/src/input/TimeInput.tsx
@@ -75,6 +75,9 @@ export const TimeInput = ({
75
const { error, invalid, isTouched } = fieldState;
76
const { isSubmitted } = formState;
77
78
+ const renderHelperText =
79
+ helperText !== false || ((isTouched || isSubmitted) && invalid);
80
+
81
return (
82
<TextField
83
id={id}
@@ -86,11 +89,13 @@ export const TimeInput = ({
86
89
margin={margin}
87
90
error={(isTouched || isSubmitted) && invalid}
88
91
helperText={
- <InputHelperText
- touched={isTouched || isSubmitted}
- error={error?.message}
92
- helperText={helperText}
93
- />
+ renderHelperText ? (
+ <InputHelperText
94
+ touched={isTouched || isSubmitted}
95
+ error={error?.message}
96
+ helperText={helperText}
97
+ />
98
+ ) : null
99
}
100
label={
101
<FieldTitle
0 commit comments