How to open a dialog from a child Outlet route?
I have a dialog in a parent component. I want my outlet routes to be able to open that dialog but can't find a way to pass the openDialog function the child route since outlet doesnt accept props.
I have a function like this that needs to be called in the child route. Any help would be appreciated thanks!
const openDeleteDialog = (type: string, itemId: number) => {
setDeleteDialogOpen(true);
setItemToDelete(itemId);
setItemType(type);
};
I have a function like this that needs to be called in the child route. Any help would be appreciated thanks!