7.2 KiB
id, title, sidebar_label, sidebar_position, custom_edit_url
| id | title | sidebar_label | sidebar_position | custom_edit_url |
|---|---|---|---|---|
| entitycollection | Interface: EntityCollection<S, Key, AdditionalKey> | EntityCollection | 0 | null |
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.
If you need a lower level implementation you can check CollectionTable
Type parameters
| Name | Type |
|---|---|
S |
S: EntitySchema<Key> = EntitySchema<any> |
Key |
Key: string = Extract<keyof S["properties"], string> |
AdditionalKey |
AdditionalKey: string = string |
Properties
additionalColumns
• Optional additionalColumns: AdditionalColumnDelegate<AdditionalKey, S, Key>[]
You can add additional columns to the collection view by implementing an additional column delegate.q
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: (Key | AdditionalKey)[]
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
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
extraActions
• Optional extraActions: (extraActionsParams: ExtraActionsParams<S, Key>) => ReactNode
Builder for rendering additional components such as buttons in the collection toolbar
param this collection view
param current selected entities by the end user or
undefined if none
Type declaration
▸ (extraActionsParams): ReactNode
Parameters
| Name | Type |
|---|---|
extraActionsParams |
ExtraActionsParams<S, Key> |
Returns
ReactNode
Defined in
filterableProperties
• Optional filterableProperties: Key[]
Properties that can be filtered in this view
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: Partial<{ [K in string]: [WhereFilterOp, any]}>
Initial filters applied to this collection. Consider that you
can filter any property, but only those included in
filterableProperties will include the corresponding filter widget.
Defaults to none.
Defined in
initialSort
• Optional initialSort: [Key, "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
permissions
• Optional permissions: PermissionsBuilder<S, Key>
Permissions the logged-in user can perform on this collection.
If not specified everything defaults to true
Defined in
properties
• Optional properties: (Key | AdditionalKey)[]
Properties displayed in this collection. If this property is not set every property is displayed
Defined in
relativePath
• relativePath: string
Relative Firestore 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
schema
• schema: S
Schema representing the entities of this view
Defined in
selectionEnabled
• Optional selectionEnabled: boolean
Are the entities in this collection selectable. Defaults to true
Defined in
subcollections
• Optional subcollections: EntityCollectionView<EntitySchema<any, any>, any, string>[]
Following the Firestore document and collection schema, you can add subcollections to your entity in the same way you define the root collections.
Defined in
textSearchDelegate
• Optional textSearchDelegate: TextSearchDelegate
If a text search delegate is supplied, a search bar is displayed on top