No handler on dialog close/open
harm-meijer opened this issue · 2 comments
harm-meijer commented
useQuestions gives me openDialog, closeDialog and setProcessing. How do I give the dialog an onClose handler?
TarikHuber commented
The handleAction
gives you an handleClose
as parameter:
handleAction: (handleClose) => {
setProcessing(true)
console.log('Doing some async stuff')
setTimeout(() => {
console.log('finished async stuff')
//Do some stuff and then
handleClose()
}, 3000)
},