ui: improve form field components, add support for custom fields, export components

Enhanced `FieldLabel` to support tooltips and additional props. Refactored form field components for better customizability and ensured compatibility with new `CustomField`. Updated `onChange` handlers to include context for improved flexibility. Added exports for UI components.
This commit is contained in:
dswbx
2025-09-18 10:03:16 +02:00
parent d6f2500be2
commit 15c32c0e6d
8 changed files with 87 additions and 36 deletions

View File

@@ -93,9 +93,11 @@ export function EntityRelationalFormField({
return (
<Formy.Group>
<Formy.Label htmlFor={fieldApi.name}>
{field.getLabel({ fallback: false }) ?? entity.label}
</Formy.Label>
<Formy.FieldLabel
htmlFor={fieldApi.name}
field={field}
label={field.getLabel({ fallback: false }) ?? entity.label}
/>
<div
data-disabled={fetching || disabled ? 1 : undefined}
className="data-[disabled]:opacity-70 data-[disabled]:pointer-events-none"