Skip to main content
Devias ships built-in field types and view types. A module can add more from its ./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 are table, 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.
Register it with 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.