feat(web/input): required fields

This commit is contained in:
Luke committed 2023-01-08 11:40:35 +01:00
1 parent 6c4485b570
commit d5a9a3fb90
7 files changed
+32 -4

No files matched your search

@@ -16,6 +16,7 @@ const NumberField: React.FC<Props> = (props) => {
name: `test.${props.index}.value`,
control: props.control,
defaultValue: props.row.default,
rules: { required: props.row.required },
});
return (
@@ -32,6 +33,7 @@ const NumberField: React.FC<Props> = (props) => {
max={props.row.max}
disabled={props.row.disabled}
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
withAsterisk={props.row.required}
/>
);
};