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

FloatPanel Status Change on Closure #5438

Closed
brandon-herrada-wdc opened this issue Aug 24, 2023 · 2 comments · Fixed by #5466
Closed

FloatPanel Status Change on Closure #5438

brandon-herrada-wdc opened this issue Aug 24, 2023 · 2 comments · Fixed by #5466
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@brandon-herrada-wdc
Copy link

Issue

FloatPanel does not initiate a status change when clicking the close icon. I think it is due to JsPanel not sending a status change for close.

Example Solution

Add onbeforeclose option to config in _scripts:

onbeforeclose: function(panel, status, closedByUser) { data.status = 'closed' }

This should ensure that a status change is issued for closure.

Additional context

This feature would allow a watcher monitoring FloatPanel status to send an update on window closure. For example, I was running a dtale session with an html iframe pointing to the dtale session url inside of the floatpanel. I wanted to be able to kill the session when I close the floatpanel.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Aug 25, 2023

Wow. Are you using dtale with Panel? Could you share a minimum, reproducible example (on Discourse) (with the FloatPanel)?

@brandon-herrada-wdc
Copy link
Author

Added example to Discourse: FloatPanel with Dtale Session and Status Change on Closure.

I followed another users example to get the dtale redirected through float panel: Can I use dtale in Panel?.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Aug 31, 2023
@philippjfr philippjfr added this to the v1.2.2 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants