-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
confirmActionFunc is not supporting a compromised async function #6736
Comments
@jiyuan12354 Our UI widgets works in sync mode. However, in fact, you are not the first person who are asking about making confirmActionFunc async. Let me see what we can do here. Thank you, |
@jiyuan12354 Please review this PR. Thank you, |
Here is the example of using //Example of using
Survey.settings.confirmActionAsync = (message, resCallback) => {
setTimeout(() => {
if(confirm(message)) resCallback(true);
}, 300);
return true; //should return true
}; Thank you, |
Thanks @andrewtelnov maybe I am not the expert. could you tell me, based on this branch |
I ran |
@jiyuan12354 Great! We release every week. This PR should be merged with master today or on Monday. We commonly release every Tuesday/Wednesday. Thank you, |
@jiyuan12354 We are goint to release new version today. I have just renamed confirmActionAsyncFunc into confirmActionAsync. Please take it into account. Here is my commit. Thank you, |
Our company is bought surveyjs Pro, and we use the surveyjs to render a questionare form. surveyjs is powerful,but I want to post a issue here which other team may also interested in.
surveyjs did provide a property named
confirmActionFunc
, attempt to provide a customized feature for users to overwrite the default window.comfirm, but I checked the source code, surveyjs don't accept any promised/async confirmActionFunc in this case...and you may know user can't provide a sync function to get confirm result immediately, so the case is confirmActionFunc is not work for the real caseThis is requesting a feature
I am requesting a feature, related to
confirmActionFunc
, I'd like overwrite the defaultconfirmAction
function with a promised customizedconfirmAction
What is the current behavior?
panel will be removed no matter my promised confirmActionFunc execute result, becasue surveyjs will regard the confirmActionFunc as a sync function which return true/false immediately
What is the expected behavior?
I’d like to see that surveyjs supporting the async confirmActionFunc, so that I can render my own customized confirm modal as I want
The text was updated successfully, but these errors were encountered: