feat: add placeholder support to EntityForm FieldDef
This commit is contained in:
@@ -14,6 +14,7 @@ export interface FieldDef {
|
||||
required?: boolean
|
||||
type?: 'text' | 'select' | 'number'
|
||||
options?: { value: string | number; label: string }[]
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -67,6 +68,7 @@ export default function EntityForm({ open, title, fields, initialValues, onClose
|
||||
value={values[f.name] ?? ''}
|
||||
onChange={(e) => handleChange(f.name, e.target.value)}
|
||||
size="small"
|
||||
placeholder={f.placeholder}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user