- fixed validating table form field;

- fixed issue with bando preview;
This commit is contained in:
Vitalii Kiiko
2024-10-22 12:51:58 +02:00
parent 250a75e375
commit 1b37b7b548
4 changed files with 24 additions and 21 deletions

View File

@@ -136,7 +136,8 @@ const Table = ({
return (
<>
<label htmlFor={fieldName} className={classNames({ 'p-error': errors[fieldName] })}>
{label}{config.required || config.isRequired ? <span className="appForm__field--required">*</span> : null}
{label}{config.required || config.isRequired || (config.validate && config.validate.nonEmptyTables)
? <span className="appForm__field--required">*</span> : null}
</label>
{rows ? <RenderTable columns={columns} data={rows} setRowsFn={updateRows}/> : null}
{!isEmpty(columns) && !shouldDisableNewRows