Skip to main content
Version: 2.0.0

Function: useReferenceDialog

useReferenceDialog<M>(referenceDialogProps): Object

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

NameType
Mextends Record<string, any>

Parameters

NameType
referenceDialogPropsOmit<ReferenceSelectionInnerProps<M>, "path"> & { onClose?: () => void ; path?: string | false }

Returns

Object

NameType
close() => void
open() => void

Defined in

lib/src/hooks/useReferenceDialog.tsx:16

Enterprise or start-up?

Learn how to get the most out of your project with the help of our consulting team.
Learn more
Sign up to our newsletter to get the latest news and updates. No spam!