Skip to content
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

Fix showConfirmationModal promise functionality #3668

Closed
ndricimrr opened this issue Mar 6, 2024 · 0 comments · Fixed by #3742
Closed

Fix showConfirmationModal promise functionality #3668

ndricimrr opened this issue Mar 6, 2024 · 0 comments · Fixed by #3742
Assignees
Labels
bug Something isn't working container ora ora related issues

Comments

@ndricimrr
Copy link
Contributor

The following function is supposed to emulate the Core functionality with a Promise based structure. As in core, the developer should be able to have a callable callback function to send back the result which is then resolved.

Currently this callback is missing.

Would need to use the this.containerService.dispatch instead to add a 'callback' name too so its transferred to the passed event and send the result back to the promise.

showConfirmationModal: async settings => {
return new Promise((resolve, reject) => {
this.dispatchLuigiEvent(Events.SHOW_CONFIRMATION_MODAL_REQUEST, settings, data => {
if (data) {
resolve(data);
} else {
reject(new Error('No data'));
}
});
});
},

@ndricimrr ndricimrr added bug Something isn't working container labels Mar 6, 2024
@JohannesDoberer JohannesDoberer self-assigned this May 7, 2024
@JohannesDoberer JohannesDoberer removed their assignment May 17, 2024
@walmazacn walmazacn self-assigned this May 21, 2024
@walmazacn walmazacn linked a pull request May 22, 2024 that will close this issue
@hardl hardl added the ora ora related issues label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working container ora ora related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants