./studio export with defineFieldType and defineViewType. The built-in field types are listed in Data model.
Add a field type with defineFieldType
A field type says how a value is stored, shown and edited. The CRM’s star rating is an example.
Register it on the module’s studio side with
fieldTypes: [ratingType]. Fields of that type are then declared in the manifest like built-in ones.
Add a view type with defineViewType
The built-in view types aretable, kanban and calendar. A view type is a React component that receives the records and the view’s settings, plus flags (capabilities) saying which toolbar controls apply: filter, sort, group by, fields, search.
viewTypes: [...]. Views in a manifest can then use type: 'gallery'.
A custom type is needed only when no built-in fits. Most needs for a new field are a built-in type with the right settings, and most needs for a new view are a better table.
Related
- Blocks: add pieces to Home and record pages.
- Objects and fields in a module: declare fields of a type.
- Data model: the built-in field types.