Title rewritten to: PrimeVue ConfirmDialog Multiple Instances Issue
P粉328911308
P粉328911308 2024-01-05 20:57:59
0
1
310

I have a component from PrimeVue and it works fine except it opens multiple times when activated; for reference, I do that multiple times throughout the process Components, some confirmation dialogs only open once, most usually open twice. When the dialog is accepted or rejected, they all close immediately, however, when pressing the "X" in the upper right corner of the dialog, it only closes one instance at a time, showing multiple dialogs open.

What I tried: Use key

<ConfirmDialog key="myDialog" />

...

const confirmer = (
 message,
 header,
 icon,
 ) => {
confirm.require({
 accept: () => { confirm.close()},
 reject: () => { confirm.close()},
 key: 'myDialog'
})}

thanks for your help.

P粉328911308
P粉328911308

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!