Closed injaan closed 2 years ago
Hi @injaan
Can you please share your snippet to see what is happening?
In addition: You need to be sure that the previous Confirm method should be removed(there is a CSS animation delay(of 300 milliseconds), so it is not removed immediately) from DOM.
The Confirm module is allowing to show only one confirmation at the same time. This means you will not get the second one if you are calling the second one before the previous one is completely removed.
Hi @furcan thank you for answered for my problem I tried following
Confirm.prompt(
'Are you sure',
'Please enter number!',
'10',
'Continue',
'Cancel',
(value) => {
if(value){
Confirm.show(
'Confirm',
`Your chosen number is ${value} are you sure to continue?`,
'Yes',
'No',
() => {
console.log("confirmed", value);
}
);
}
}
);
So is it really not possible to call 'Confirm' right after 'Prompt'? I think call confirm after prompt would be really useful if it is implemented.
Hi @injaan
This is your solution.
Thanks.
var delay = 300; // the default value
Confirm.prompt(
"Are you sure",
"Please enter number!",
"10",
"Continue",
"Cancel",
(value) => {
if (value) {
var wait = setTimeout(function () {
Confirm.show(
"Confirm",
`Your chosen number is ${value} are you sure to continue?`,
"Yes",
"No",
() => {
console.log("confirmed", value);
}
);
clearTimeout(wait);
}, delay + 1);
}
},
undefined,
{
cssAnimationDuration: delay,
},
);
@furcan thank you
You are welcome 🙏
Describe the bug
I called confirm window after successful prompt action but confirm not called, nothing happened
To Reproduce
call confirm after prompt
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.