useReferenceDialog
@firecms/core / useReferenceDialog
Function: useReferenceDialog()
Section titled “Function: useReferenceDialog()”useReferenceDialog<
M>(referenceDialogProps):object
Defined in: hooks/useReferenceDialog.tsx:16
This hook is used to open a side dialog that allows the selection
of entities under a given path.
You can use it in custom views for selecting entities.
You need to specify the path of the target collection at least.
If your collection is not defined in your top collection configuration
(in your FireCMS component), you need to specify explicitly.
This is the same hook used internally when a reference property is defined.
Type Parameters
Section titled “Type Parameters”M extends Record<string, any>
Parameters
Section titled “Parameters”referenceDialogProps
Section titled “referenceDialogProps”Omit<ReferenceSelectionInnerProps<M>, "path"> & object
Returns
Section titled “Returns”object
close()
Section titled “close()”close: () =>
void
Returns
Section titled “Returns”void
open()
Section titled “open()”open: () =>
void
Returns
Section titled “Returns”void