Skip to main content

Interface: CollectionTableProps<M, AdditionalKey>

Type parameters#

NameType
MM: Object
AdditionalKeyAdditionalKey: string = string

Properties#

additionalColumns#

Optional additionalColumns: AdditionalColumnDelegate<M, AdditionalKey>[]

You can add additional columns to the collection view by implementing an additional column delegate. Usually defined by the end user.

Defined in#

collection/components/CollectionTableProps.tsx:69


defaultSize#

Optional defaultSize: CollectionSize

Default table size before being changed with the selector

Defined in#

collection/components/CollectionTableProps.tsx:50


displayedProperties#

displayedProperties: string[]

Properties displayed in this collection. If this property is not set every property is displayed, you can filter

Defined in#

collection/components/CollectionTableProps.tsx:62


entitiesDisplayedFirst#

Optional entitiesDisplayedFirst: Entity<M>[]

List of entities that will be displayed on top, no matter the ordering. This is used for reference fields selection

Defined in#

collection/components/CollectionTableProps.tsx:87


filterCombinations#

Optional filterCombinations: Partial<Record<Extract<keyof M, string>, "asc" | "desc">>[]

If you need to filter/sort by multiple properties in this collection, you may need to create special indexes in your datasource (e.g. Firestore). You can then specify here the indexes created.

Defined in#

collection/components/CollectionTableProps.tsx:81


frozenIdColumn#

Optional frozenIdColumn: boolean

Is the id column frozen to the left.

Defined in#

collection/components/CollectionTableProps.tsx:108


initialFilter#

Optional initialFilter: FilterValues<M>

In case this table should have some filters set by default

Defined in#

collection/components/CollectionTableProps.tsx:35


initialSort#

Optional initialSort: [Extract<keyof M, string>, "asc" | "desc"]

Default sort applied to this collection

Defined in#

collection/components/CollectionTableProps.tsx:40


inlineEditing#

inlineEditing: boolean | (entity: Entity<any>) => boolean

Can the table be edited inline

Defined in#

collection/components/CollectionTableProps.tsx:74


onCellValueChange#

Optional onCellValueChange: OnCellValueChange<unknown, M>

Callback when the value of a cell has been edited

param

Defined in#

collection/components/CollectionTableProps.tsx:118


pageSize#

Optional pageSize: number

How many entries are loaded per page

Defined in#

collection/components/CollectionTableProps.tsx:122


paginationEnabled#

paginationEnabled: boolean

If enabled, content is loaded in batch

Defined in#

collection/components/CollectionTableProps.tsx:45


path#

path: string

Absolute collection path

Defined in#

collection/components/CollectionTableProps.tsx:20


schema#

schema: EntitySchema<M>

Schema of the entity displayed by this collection

Defined in#

collection/components/CollectionTableProps.tsx:25


tableRowActionsBuilder#

Optional tableRowActionsBuilder: (__namedParameters: { entity: Entity<M> ; size: CollectionSize }) => ReactNode

Builder for creating the buttons in each row

param

param

Type declaration#

▸ (__namedParameters): ReactNode

Parameters#
NameType
__namedParametersObject
__namedParameters.entityEntity<M>
__namedParameters.sizeCollectionSize
Returns#

ReactNode

Defined in#

collection/components/CollectionTableProps.tsx:100


textSearchEnabled#

Optional textSearchEnabled: boolean

Flag to indicate if a search bar should be displayed on top of the collection table.

Defined in#

collection/components/CollectionTableProps.tsx:56


title#

Optional title: ReactNode

Override the title in the toolbar

Defined in#

collection/components/CollectionTableProps.tsx:30


toolbarActionsBuilder#

Optional toolbarActionsBuilder: (props: { data: Entity<any>[] ; size: CollectionSize }) => ReactNode

Additional components builder such as buttons in the collection toolbar

Type declaration#

▸ (props): ReactNode

Parameters#
NameType
propsObject
props.dataEntity<any>[]
props.sizeCollectionSize
Returns#

ReactNode

Defined in#

collection/components/CollectionTableProps.tsx:93


uniqueFieldValidator#

Optional uniqueFieldValidator: UniqueFieldValidator

Use this callback to validate if an entity field should be unique

Defined in#

collection/components/CollectionTableProps.tsx:113

Methods#

onEntityClick#

Optional onEntityClick(entity): void

Callback when anywhere on the table is clicked

Parameters#

NameType
entityEntity<M>

Returns#

void

Defined in#

collection/components/CollectionTableProps.tsx:127