Open wight554 opened 2 years ago
Unsure about this one. Trying to replicate it in smaller form. It only happens on submit when num field is in form:
Warning: Received `true` for a non-boolean attribute `decimal`.
If you want to write it to the DOM, pass a string instead: decimal="true" or decimal={value.toString()}.
Edit: it's somehow related to ErrorField
, reproduction snippet:
const schema = {
title: 'Test',
type: 'object',
properties: {
num: { title: 'Num', type: 'number', minimum: 0, maximum: 100 },
},
required: ['num'],
};
const schemaValidator = createValidator(schema);
export const bridge = new JSONSchemaBridge(schema, schemaValidator);
<AutoForm schema={bridge}>
<AutoField name="num" />
<ErrorField name="num" />
<SubmitField />
</AutoForm>
Edit2: I assume it's due to
// uniforms-mui/src/ErrorField.tsx
<FormHelperText {...filterDOMProps(props)}>
{children || errorMessage}
</FormHelperText>
@radekmie at this point that's all I've faced. Might help debugging other possible props
@wight554 Thanks for the issue report. Did you by any chance check if the same behavior exists for the uniforms-material
theme too?
Version:
Errors I've managed to catch (more to be added):
SelectField: