Skip to content

fix(material-renderers): add missing Mui-error class for some controls #2433

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const MuiInputInteger = React.memo(function MuiInputInteger(
id,
enabled,
uischema,
isValid,
path,
handleChange,
config,
Expand Down Expand Up @@ -70,6 +71,7 @@ export const MuiInputInteger = React.memo(function MuiInputInteger(
autoFocus={appliedUiSchemaOptions.focus}
inputProps={inputProps}
fullWidth={true}
error={!isValid}
/>
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const MuiInputNumber = React.memo(function MuiInputNumber(
id,
enabled,
uischema,
isValid,
path,
handleChange,
config,
Expand Down Expand Up @@ -68,6 +69,7 @@ export const MuiInputNumber = React.memo(function MuiInputNumber(
autoFocus={appliedUiSchemaOptions.focus}
inputProps={inputProps}
fullWidth={true}
error={!isValid}
/>
);
});
2 changes: 2 additions & 0 deletions packages/material-renderers/src/mui-controls/MuiInputTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const MuiInputTime = React.memo(function MuiInputTime(
id,
enabled,
uischema,
isValid,
path,
handleChange,
config,
Expand All @@ -61,6 +62,7 @@ export const MuiInputTime = React.memo(function MuiInputTime(
disabled={!enabled}
autoFocus={appliedUiSchemaOptions.focus}
fullWidth={true}
error={!isValid}
/>
);
});
2 changes: 2 additions & 0 deletions packages/material-renderers/src/mui-controls/MuiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const MuiSelect = React.memo(function MuiSelect(
enabled,
schema,
uischema,
isValid,
path,
handleChange,
options,
Expand All @@ -69,6 +70,7 @@ export const MuiSelect = React.memo(function MuiSelect(
onChange={(ev) => handleChange(path, ev.target.value || undefined)}
fullWidth={true}
multiple={multiple || false}
error={!isValid}
>
{[
<MenuItem value={''} key='jsonforms.enum.none'>
Expand Down