Feat: add s3-compatible storage boxes (#11313)

### What problem does this PR solve?

PR for implementing s3 compatible storage units #11240 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Jonah Hartmann
2025-11-18 02:39:25 +01:00
committed by GitHub
parent 1dba6b5bf9
commit 89e8818dda
6 changed files with 48 additions and 5 deletions

View File

@ -67,6 +67,7 @@ export interface FormFieldConfig {
) => string | boolean | Promise<string | boolean>;
dependencies?: string[];
schema?: ZodSchema;
shouldRender?: (formValues: any) => boolean;
}
// Component props interface
@ -654,6 +655,9 @@ const DynamicForm = {
}
};
// Watch all form values to re-render when they change (for shouldRender checks)
const formValues = form.watch();
return (
<Form {...form}>
<form
@ -664,11 +668,19 @@ const DynamicForm = {
}}
>
<>
{fields.map((field) => (
<div key={field.name} className={cn({ hidden: field.hidden })}>
{renderField(field)}
</div>
))}
{fields.map((field) => {
const shouldShow = field.shouldRender
? field.shouldRender(formValues)
: true;
return (
<div
key={field.name}
className={cn({ hidden: field.hidden || !shouldShow })}
>
{renderField(field)}
</div>
);
})}
{children}
</>
</form>