Merge pull request #367 from payloadcms/feat/form-onchange

Feat/form onchange
This commit is contained in:
James Mikrut
2021-11-25 10:39:02 -05:00
committed by GitHub
31 changed files with 410 additions and 88 deletions

View File

@@ -101,6 +101,8 @@ export type TextField = FieldBase & {
placeholder?: string
autoComplete?: string
}
value?: string
onChange?: (value: string) => void
}
export type EmailField = FieldBase & {
@@ -169,9 +171,11 @@ export type UIField = {
}
export type UploadField = FieldBase & {
type: 'upload';
relationTo: string;
maxDepth?: number;
type: 'upload'
relationTo: string
maxDepth?: number
value?: string
onChange?: (value: string) => void
}
type CodeAdmin = Admin & {
@@ -186,9 +190,11 @@ export type CodeField = Omit<FieldBase, 'admin'> & {
}
export type SelectField = FieldBase & {
type: 'select';
options: Option[];
hasMany?: boolean;
type: 'select'
options: Option[]
hasMany?: boolean
value?: string
onChange?: (value: string) => void
}
export type RelationshipField = FieldBase & {