8000 onWillClose event for panels · Issue #854 · mathuo/dockview · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
onWillClose event for panels #854
Open
@mgray88

Description

@mgray88

Is your feature request related to a problem? Please describe.
I would like to be able to detect when a panel is being closed so I can either prevent it or save state.

Describe the solution you'd like
An onWillClose event handler passed in to component props alongside onDidActiveChange and others.

Describe alternatives you've considered
Tried to use closeActionOverride in a tab renderer and dispatching an event to the tab. The closest I could get was the following, which doesn't dispatch to the dom element pertaining to the rendered component:

props.containerApi
  .getPanel(id)
  ?.view.content.element.dispatchEvent(new FocusEvent('focus'))

eta: I have defaultRenderer set to always so the dom elements are outside of the scope of the event above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0