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

Callback function for onCloseEnd parameter is always being invoked #429

Open
raintomista opened this issue May 22, 2018 · 1 comment
Open

Comments

@raintomista
Copy link

Hi!

I'm trying to reset a form of a dismissible modal using the onCloseEnd parameter. However, it seems that the resetLoginForm() is always being invoked by the code snippet below even if the modal is not dismissed yet. <div id="login-box" class="modal" materialize="modal" [materializeActions]="loginModal [materializeParams]="[{endingTop: '25%', onCloseEnd: resetLoginForm()}]">

The form becomes unusable since the form keeps on resetting.

Any help would be appreciated!

@raintomista raintomista changed the title Callback function for onCloseEnd parameter is always invoked Callback function for onCloseEnd parameter is always being invoked May 22, 2018
@aron9forever
Copy link

Having the same issue, the function is spammed constantly and on any random action (mouseovers, nothing to do with modal). Tried this way as well

onCloseParams = [{ onCloseEnd: () => { console.log('ay'); } }];
then
[materializeParams]="onCloseParams"

Doing it this way will just not do anything at all, the function never gets called. Code copied from #354 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants