Field Class

Describes a single content field. A field is usually represented as a grid column or a property pane row.

Extended by

Methods

Name Description
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, editor?: EditorDescription, renderer?: RendererDescription, extendedData?: [key: string]: unknown): Field Creates an instance of Field.  
clone(): Field    
getFieldDescriptor(): FieldDescriptor Get descriptor for this field.  
isNestedContentField(): this is NestedContentField Is this a NestedContentField  
isPropertiesField(): this is PropertiesField Is this a PropertiesField  
matchesDescriptor(descriptor: FieldDescriptor): boolean Checks if this field matches given field descriptor  
rebuildParentship(parentField?: NestedContentField): void Sets provided NestedContentField as parent of this field.  
resetParentship(): void Resets field's parent.  
toCompressedJSON(_classesMap: [id: string]: CompressedClassInfoJSON): FieldJSON<string> Serialize this object to compressed JSON  
toJSON(): FieldJSON<ClassInfoJSON> Serialize this object to JSON  
fromCompressedJSON(json: FieldJSON<string>, classesMap: [id: string]: CompressedClassInfoJSON, categories: CategoryDescription[]): undefined | Field Static Deserialize a Field from compressed JSON.  
fromJSON(json: FieldJSON<ClassInfoJSON>, categories: CategoryDescription[]): undefined | Field Static Deserialize Field from JSON  
getCategoryFromFieldJson(fieldJson: FieldJSON<ClassInfoJSON>, categories: CategoryDescription[]): CategoryDescription Protected Static    

Properties

Name Type Description
category CategoryDescription Category information  
editor EditorDescription | undefined Property editor used to edit values of this field  
extendedData [key: string]: unknown | undefined Extended data associated with this field  
isReadonly boolean Are values in this field read-only  
label string Display label  
name string Unique name  
parent Accessor ReadOnly undefined | NestedContentField Get parent  
priority number Priority of the field.  
renderer RendererDescription | undefined Property renderer used to render values of this field  
type TypeDescription Description of this field's values data type  

Defined in

Last Updated: 28 October, 2024