Quasar: QMenu not working in QTree node header slot

Created on 19 Jun 2019  路  2Comments  路  Source: quasarframework/quasar

Trying the following:

  1. In a QTree header section
  2. create a button which opens a menu

Codepen/jsFiddle (required)
https://codesandbox.io/s/cfbwr?fontsize=14

Potential bug / problem:
If the button is in the default-header slot, then the menu WILL NOT display upon clicking the button

If, however, the button is in the default-body slot, then the menu WILL display.

To Reproduce

  1. Click on drop down button in first node header --> menu will NOT display
  2. Click on drop down button in first node body --> menu WILL display

Expected behavior
Menu should display in default-header slot when drop down button is clicked. Just like it does when clicking on the drop down button in the default-body slot.

bug

Most helpful comment

Hi,

Add a @click.stop to your QBtn (which has the menu) in the node header. Otherwise it messes up with QTree's own events.
Will research if there's a way to make this easier, but until then, this is the way.

All 2 comments

Hi,

Add a @click.stop to your QBtn (which has the menu) in the node header. Otherwise it messes up with QTree's own events.
Will research if there's a way to make this easier, but until then, this is the way.

Awesome. Works like a charm. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hctpbl picture hctpbl  路  3Comments

Bangood picture Bangood  路  3Comments

xereda picture xereda  路  3Comments

danikane picture danikane  路  3Comments

adwidianjaya picture adwidianjaya  路  3Comments