-
Notifications
You must be signed in to change notification settings - Fork 6
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
How to Detect Modal Close or Preferences Update? #13
Comments
Hi @cristinaITdeveloper, Can you please provide me with a minimal reproducer to show me what you are trying to achieve? A basic NextJS project with minimal dependencies and a sample page with some comments about the expected behavior might help. |
Hi @liarco, thanks for reply. I need to know when the user changes consents by opening the modal with the Probably the insertion of callbacks (of the open PR) can help in this case by implementing the Also because I noticed that the first time accepting or rejecting from the banner, the |
I have already written previously what I would need. |
Ok, this is "what you need" and I get it, but I asked the "use case for this need", which is what you need it for. For instance: "I want to be able to update a css class on an element whenever a user enables the marketing features". Of course this specific result can be obtained without the callbacks, but this is exactly my point: I can't think of a use case that requires this feature.
What do you mean? Is this a bug? It's hard to understand what's not working without a sample project to review an run on my machine. Can't you really create one that shows this issue? |
I’m using this library in my Next.js application, and I’ve implemented a button in the footer that opens the preferences modal using the openPreferences method.
Now, I’d like to detect when the modal is closed or when the user updates their preferences. I’ve tried listening for events such as preferences_updated or iubenda_preferences_updated, but they don’t seem to be triggered.
Additionally, I see there’s a dispatchUserPreferences method in the library, but I’m not sure how to use it effectively in this context. Could you please clarify:
Any guidance or examples would be greatly appreciated.
The text was updated successfully, but these errors were encountered: