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

Emit double click event #182

Open
giuppep opened this issue Jan 12, 2023 · 2 comments · May be fixed by #183
Open

Emit double click event #182

giuppep opened this issue Jan 12, 2023 · 2 comments · May be fixed by #183

Comments

@giuppep
Copy link

giuppep commented Jan 12, 2023

Currently it's possible to maximise the panel after a splitter by double clicking on it. However, this is not necessarily the behaviour one would generally expect.

For example, I'd like to be able to reset the initial size of the panes when double clicking on the splitter.
As another example, one may want to maximise the pane before the splitter - as already mentioned in the docs:

You can also double click a splitter to maximize the next pane! (First pane splitter will be an option soon)

Other users may want to implement other custom behaviour, see e.g. #181.

These issues could all be solved by simply emitting the double-click event and let the user handle it how they like.

@giuppep giuppep linked a pull request Jan 12, 2023 that will close this issue
@M1CK431
Copy link

M1CK431 commented Mar 15, 2023

I have this need too. Can't use this lib until it's finally handled 😢

@mariusvigariu
Copy link

Try this:

  let splitterClickCount = 0 
  
  const onSplitterClick = () => {
    splitterClickCount += 1
    if (splitterClickCount === 2) {
      doStuffOnDblClick()
      splitterClickCount = 0 
    }
  }

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

Successfully merging a pull request may close this issue.

3 participants