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

Event row-* and Qtable (one bug and one feature request) #9132

Closed
alemila01 opened this issue May 1, 2021 · 6 comments
Closed

Event row-* and Qtable (one bug and one feature request) #9132

alemila01 opened this issue May 1, 2021 · 6 comments

Comments

@alemila01
Copy link

alemila01 commented May 1, 2021

Describe the bug
Actually 2 issue on this:
the "easy" one i this warning on console:
Component emitted event "row-contextmenu" but it is neither declared in the emits option nor as an "onRow-contextmenu" prop

The second is that not work if i set grid mode.

Expected behavior
No warning and work in grid mode

@alemila01 alemila01 added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels May 1, 2021
@alemila01 alemila01 changed the title Warning on event row-contextmenu and Qtable Event row-contextmenu and Qtable May 1, 2021
@metalsadman
Copy link
Member

metalsadman commented May 2, 2021

It works fine https://codepen.io/metalsadman/pen/JjEQqpz?editors=101.
for 2 it's stated in docs:

@row-contextmenu -> function(evt, row, index)
Description
Emitted when user right clicks/long taps on a row; Is not emitted when using body/row/item scoped slots

you will have to use item slot and use @contextmenu event on your card. see this example for using the slot https://next.quasar.dev/vue-components/table#example--grid-style-with-slot.

@alemila01
Copy link
Author

alemila01 commented May 2, 2021

  1. if you use production js warnings dont came out (all row-* event fire this warning i think miss emits:[] for vue3)
  2. i dont use any slot at all so i supposed that work as stated the equivalent of a row in non-grid mode

https://jsfiddle.net/3z96aLt4

@alemila01 alemila01 changed the title Event row-contextmenu and Qtable Event row-contextmenu and Qtable (one bug and one feature request) May 2, 2021
@alemila01 alemila01 changed the title Event row-contextmenu and Qtable (one bug and one feature request) Event row-* and Qtable (one bug and one feature request) May 2, 2021
@metalsadman
Copy link
Member

@alemila01
use latest qv2 version https://jsfiddle.net/1xfqmzwp/, or fork the one from https://codesandbox.io/s/optimistic-poitras-4t3m3.

@alemila01
Copy link
Author

I already told you that is a problem in dev mode not in production...

https://codesandbox.io/s/kind-hill-cw02c

@rstoenescu
Copy link
Member

This is a Vue bug, not Quasar.
The warning message should be [...] nor as an "onRowContextmenu" NOT nor as an "onRow-contextmenu". Can someone open up a ticket on the Vue repo pls? (And mention it here too)

@rstoenescu
Copy link
Member

Pushed a workaround until the bug can be fixed in Vue.
Was possible due to another event related fix that went into vue 3.0.11 (vuejs/core@c1cd42e)

Workaround will go into v2.0.0-beta.18.

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

No branches or pull requests

3 participants