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

Hook for when action modal is closed #10122

Open
danharrin opened this issue Dec 6, 2023 · 7 comments · May be fixed by #14942
Open

Hook for when action modal is closed #10122

danharrin opened this issue Dec 6, 2023 · 7 comments · May be fixed by #14942
Assignees
Milestone

Comments

@danharrin
Copy link
Member

danharrin commented Dec 6, 2023

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@danharrin danharrin added the enhancement New feature or request label Dec 6, 2023
@danharrin danharrin added this to the v3 milestone Dec 6, 2023
@danharrin danharrin self-assigned this Dec 6, 2023
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Dec 6, 2023
@polar-sh polar-sh bot added the Fund label Jun 3, 2024
@danharrin danharrin removed the fund label Jun 4, 2024
@danharrin danharrin modified the milestones: v3, v4 Jul 30, 2024
@thethunderturner
Copy link
Contributor

thethunderturner commented Aug 20, 2024

Hey, do you mind if I submit a PR for this? If I may, should I rename the after() hook to afterSubmit()? Then I can create afterClose/afterCancel() to avoid confusion. Or should I keep it just as afterClose()?

@danharrin
Copy link
Member Author

Before implementing this I would like someone to reply here and let me know what use case they have for this hook, so that I can make sure needs are met. I have heard a lot of requests for this but would like to extra clarification before proceeding.

@thethunderturner
Copy link
Contributor

Before implementing this I would like someone to reply here and let me know what use case they have for this hook, so that I can make sure needs are met. I have heard a lot of requests for this but would like to extra clarification before proceeding.

I personally have no use for it, I made the PR because there was an issue for it. During the summer I accidentally deleted it though 😅. I can make it again if thats ok. If there is no use for the PR, we can ignore it.

@thethunderturner thethunderturner linked a pull request Nov 30, 2024 that will close this issue
3 tasks
@danharrin
Copy link
Member Author

Yeah I'm just struggling to imagine how you would use it, hence why I haven't merged it

@trevorgreenleaf
Copy link

Example usage:

  1. The user needs to get onboarded to a page
  2. So you call an action modal on load
  3. The user reads the description in the modal and then closes the modal
  4. On close, set has_seen_xpage_onboarding to true on the user model

@danharrin
Copy link
Member Author

Should you not do that when the modal is opened, mountUsing()? So then it still gets recorded if you close the browser instead of the modal?

@dbpolito
Copy link
Contributor

dbpolito commented Jan 6, 2025

I have a use case for this... I have a module that automatically opens unread announcements for users... one by one, so after the user closes, it automatically opens the next one...

But i can think of many use cases for this, like setting the modal as read, maybe you want to track when the user opens it, but also when you closed... etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants