I have react code to call the modal using controller method like this:
const [showCommentsModal] = useIonModal(CommentsModal);
React.useEffect(
function showCommentsModalOnCandleSelected() {
if (!selectedCandleId) return;
showCommentsModal({
initialBreakpoint: 1,
breakpoints: [0, 0.5, 1],
onDidDismiss: () => {
setSelectedCandleId(null);
},
});
},
[selectedCandleId, showCommentsModal],
);
The problem is, how I can listen or implement the modal events that listed on this docs: https://ionicframework.com/docs/api/modal#events with my controller modal.