Skip to content

Commit

Permalink
Make SelectInput and SelectArrayInput helperText space always reserved
Browse files Browse the repository at this point in the history
Refs #4364
  • Loading branch information
fzaninotto committed Jan 31, 2020
1 parent 0f8d1d0 commit ff8f9ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
16 changes: 7 additions & 9 deletions packages/ra-ui-materialui/src/input/SelectArrayInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,13 @@ const SelectArrayInput: FunctionComponent<
>
{choices.map(renderMenuItem)}
</Select>
{(touched && error) || helperText ? (
<FormHelperText error={touched && !!error}>
<InputHelperText
touched={touched}
error={error}
helperText={helperText}
/>
</FormHelperText>
) : null}
<FormHelperText error={touched && !!error}>
<InputHelperText
touched={touched}
error={error}
helperText={helperText}
/>
</FormHelperText>
</FormControl>
);
};
Expand Down
12 changes: 5 additions & 7 deletions packages/ra-ui-materialui/src/input/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,11 @@ const SelectInput: FunctionComponent<
clearAlwaysVisible
error={!!(touched && error)}
helperText={
(touched && error) || helperText ? (
<InputHelperText
touched={touched}
error={error}
helperText={helperText}
/>
) : null
<InputHelperText
touched={touched}
error={error}
helperText={helperText}
/>
}
{...options}
{...sanitizeRestProps(rest)}
Expand Down

0 comments on commit ff8f9ac

Please sign in to comment.