Interface: EntityCollection<M, AdditionalKey, UserType>
This interface represents a view that includes a collection of entities. It can be in the root level of the configuration, defining the main menu navigation. You can also find it as a subcollection of a different one.
Type parameters​
Name | Type |
---|---|
M | extends Object = any |
AdditionalKey | extends string = string |
UserType | User |
Properties​
additionalColumns​
• Optional
additionalColumns: AdditionalColumnDelegate
<M
, AdditionalKey
, UserType
>[]
You can add additional columns to the collection view by implementing an additional column delegate.q
Defined in​
callbacks​
• Optional
callbacks: EntityCallbacks
<M
>
This interface defines all the callbacks that can be used when an entity is being created, updated or deleted. Useful for adding your own logic or blocking the execution of the operation.
Defined in​
defaultSize​
• Optional
defaultSize: CollectionSize
Default size of the rendered collection
Defined in​
description​
• Optional
description: string
Optional description of this view. You can use Markdown.
Defined in​
excludedProperties​
• Optional
excludedProperties: (AdditionalKey
| Extract
<keyof M
, string
>)[]
Properties that should NOT get displayed in the collection view. All the other properties from the the entity are displayed It has no effect if the properties value is set.
Defined in​
exportable​
• Optional
exportable: boolean
| ExportConfig
<UserType
>
Should the data in this collection view include an export button.
You can also set an ExportConfig
configuration object to customize
the export and add additional values.
Defaults to true
Defined in​
filterCombinations​
• Optional
filterCombinations: Partial
<Record
<Extract
<keyof M
, string
>, "asc"
| "desc"
>>[]
If you need to filter/sort by multiple properties in this collection, you can define the supported filter combinations here. In the case of Firestore, you need to create special indexes in the console to support filtering/sorting by more than one property. You can then specify here the indexes created.
Defined in​
group​
• Optional
group: string
Optional field used to group top level navigation entries under a navigation view. If you set this value in a subcollection it has no effect.
Defined in​
initialFilter​
• Optional
initialFilter: FilterValues
<M
>
Initial filters applied to this collection. Defaults to none.
Defined in​
initialSort​
• Optional
initialSort: [Extract
<keyof M
, string
>, "asc"
| "desc"
]
Default sort applied to this collection
Defined in​
inlineEditing​
• Optional
inlineEditing: boolean
Can the elements in this collection be edited inline in the collection
view. If this flag is set to false but permissions.edit
is true
, entities
can still be edited in the side panel
Defined in​
name​
• name: string
Plural name of the view. E.g. 'products'
Defined in​
pagination​
• Optional
pagination: number
| boolean
If enabled, content is loaded in batches. If false
all entities in the
collection are loaded.
You can specify a number to specify the pagination size (50 by default)
Defaults to true
Defined in​
path​
• path: string
Relative path of this view to its parent. If this view is in the root the path is equal to the absolute one. This path also determines the URL in FireCMS
Defined in​
permissions​
• Optional
permissions: PermissionsBuilder
<M
, UserType
>
Permissions the logged-in user can perform on this collection.
If not specified everything defaults to true
Defined in​
properties​
• Optional
properties: (AdditionalKey
| Extract
<keyof M
, string
>)[]
Properties displayed in this collection. If this prop is not set every property is displayed
Defined in​
schema​
• schema: EntitySchema
<M
>
Schema representing the entities of this view
Defined in​
selectionController​
• Optional
selectionController: SelectionController
<M
>
Pass your own selection controller if you want to control selected entities externally.
see
useSelectionController
Defined in​
selectionEnabled​
• Optional
selectionEnabled: boolean
Are the entities in this collection selectable. Defaults to true
Defined in​
subcollections​
• Optional
subcollections: EntityCollection
<any
, any
, any
>[]
You can add subcollections to your entity in the same way you define the root collections. The collections added here will be displayed when opening the side dialog of an entity.
Defined in​
textSearchEnabled​
• Optional
textSearchEnabled: boolean
Flag to indicate if a search bar should be displayed on top of the collection table.
Defined in​
Methods​
extraActions​
â–¸ Optional
extraActions(extraActionsParams
): ReactNode
Builder for rendering additional components such as buttons in the collection toolbar
Parameters​
Name | Type |
---|---|
extraActionsParams | ExtraActionsParams <M , UserType > |
Returns​
ReactNode