-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report] DataTable click:row.ctrl Modifier Not Working #9720
Comments
Other modifiers like |
|
@jacekkarczmarczyk It starts out as a click event and then the event gets hidden. This happens in a lot of controls and events actually. Can you just add the event as a second parameter in the handlers so we can use them in our code? Passing along the events allows for more use cases (like the one in this issue) and I can't see any downside really. |
For the Passing the native event as a second argument is certainly possible, but that means any modifiers will have to be replicated manually. |
Good idea. Or, you could wrap the data in a single object containing both the event and the object. So e.event would be the event object, and e.data for the "foo" object. |
EDIT: I was mistaken, modifiers break this: vuejs/vue#10867
Wouldn't work, the first argument has to be an event for the modifiers to work. |
Fixed in a7cc135 |
Environment
Vuetify Version: 2.1.10
Vue Version: 2.6.10
Browsers: Chrome 78.0.3904.97
OS: Windows 10
Steps to reproduce
Expected Behavior
Event handler fires
Actual Behavior
Event handler does not fire
Reproduction Link
https://codepen.io/jim55063/pen/PooXgWY?&editable=true&editors=101#anon-signup
Other comments
I am replacing an existing data table in our application which allows the user to ctrl+click a row in the table and open that item in a new window (tab).
@click:row.once
works, since it doesn't require the event object to be passed to the.once
event modifier. But for the.ctrl
modifier, since you aren't passing the event to the modifier, it can't check to see if the control key is pressed and filters the event out and the handler isn't called.Also, since the event isn't passed to the handler, there is no way to know if the user had the ctrl key held down when the row was clicked.
The text was updated successfully, but these errors were encountered: