Skip to main content
Version: 2.0.0-alpha

Interface: ReferenceDialogProps<M>

Type parameters

NameType
Mextends Record<string, any>

Properties

collection

Optional collection: EntityCollection<M, string, User>

Entity collection config

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:45


forceFilter

Optional forceFilter: Partial<Record<string, [WhereFilterOp, any]>>

Allow selection of entities that pass the given filter only.

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:85


multiselect

Optional multiselect: boolean

Allow multiple selection of values

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:40


path

path: string

Absolute path of the collection. May be not set if this hook is being used in a component and the path is dynamic. If not set, the dialog won't open.

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:52


selectedEntityIds

Optional selectedEntityIds: string[]

If you are opening the dialog for the first time, you can select some entity ids to be displayed first.

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:58

Methods

onClose

Optional onClose(): void

If the dialog currently open, close it

Returns

void

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:80


onMultipleEntitiesSelected

Optional onMultipleEntitiesSelected(entities): void

If multiselect is set to true, you will get the selected entities in this callback.

Parameters

NameType
entitiesEntity<any>[]

Returns

void

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:74


onSingleEntitySelected

Optional onSingleEntitySelected(entity): void

If multiselect is set to false, you will get the selected entity in this callback.

Parameters

NameType
entitynull | Entity<any>

Returns

void

Defined in

lib/src/core/components/ReferenceSelectionView.tsx:66

Need a hand?

We are happy to offer consulting services to help you get the most out of FireCMS.
Get in touch