Interface: ReferenceDialogProps<M>
Type parameters​
Name | Type |
---|---|
M | extends Record <string , any > |
Properties​
collection​
• Optional
collection: EntityCollection
<M
, string
, User
>
Entity collection config
Defined in​
lib/src/core/components/ReferenceSelectionView.tsx:48
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:88
multiselect​
• Optional
multiselect: boolean
Allow multiple selection of values
Defined in​
lib/src/core/components/ReferenceSelectionView.tsx:43
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:55
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:61
Methods​
onClose​
â–¸ Optional
onClose(): void
If the dialog currently open, close it
Returns​
void
Defined in​
lib/src/core/components/ReferenceSelectionView.tsx:83
onMultipleEntitiesSelected​
â–¸ Optional
onMultipleEntitiesSelected(entities
): void
If multiselect
is set to true
, you will get the selected entities
in this callback.
Parameters​
Name | Type |
---|---|
entities | Entity <any >[] |
Returns​
void
Defined in​
lib/src/core/components/ReferenceSelectionView.tsx:77
onSingleEntitySelected​
â–¸ Optional
onSingleEntitySelected(entity
): void
If multiselect
is set to false
, you will get the selected entity
in this callback.
Parameters​
Name | Type |
---|---|
entity | null | Entity <any > |
Returns​
void
Defined in​
lib/src/core/components/ReferenceSelectionView.tsx:69