angela8838
angela8838

Reputation: 11

primereact dialog not triggering onHide fn from footer actions for wrapper component

primereact dialog not triggering onHide fn from footer action for wrapper compoent

https://codesandbox.io/s/trusting-cdn-jkn5t?file=/src/demo/DialogDemo.js

isue: open console > open dialog > press no > console not print onhide (for esc and close btn working)

Upvotes: 0

Views: 891

Answers (1)

Apostolos
Apostolos

Reputation: 10463

Method onHide is not triggered when clicking these buttons. It is only triggered when closing dialog from icon.

I altered your code and used ref in order to achive this via props.onHide call. Check my codesandbox

Upvotes: 1

Related Questions