[Docs] DataTable: missing props for item scoped slot
See original GitHub issueProblem to solve
This is about the beta v2.0.0-beta.1.
At the moment, it is not possible to let a table row become a clickable route and have select boxes at the same time because there is no way to native way to get the checked status of a specific row.
My old setup was like this:
<template
slot="items"
slot-scope="props">
<tr
:active="props.selected"
class="pointer"
@click="to('/somewhere')">
<td>
<v-checkbox
:input-value="props.selected"
primary
hide-details
@click.stop="props.selected = !props.selected"/>
</td>
<td>{{ props.item.name }}</td>
<td>{{ props.item.description }}</td>
</tr>
</template>
Proposed solution
Add the props from header.data-table-select
to the body
prop so one can simulate a route via row clicks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Understanding scoped slots in Vue.js - Binarcode
To put it simply a slot can be seen as a: A placeholder for content. An empty space that you want to fill...
Read more >Accessing number prop value for table colspan inside Vuetify ...
According to the props docs page, you have to use v-bind to tell Vue that this is a JS ... so I know...
Read more >Data Table - Quasar Framework
Data Table. QTable is a Component that allows you to display data in a tabular manner. Features: Filtering; Sorting; Single / Multiple rows ......
Read more ><thead>: The Table Head element - HTML - MDN Web Docs
The HTML element defines a set of rows defining the head of the columns of the table.
Read more >Slots - Vue.js
It replaces the slot and slot-scope attributes, which are now deprecated, but have not been ... Attributes bound to a <slot> element are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
oh, right. you’re using the click handler. so you’d do
@click.stop="select.on.input(!select.props.value)"
, alternatively@change="select.on.input"
https://codepen.io/anon/pen/rggNKz?editors=1010
yeah, documentation for slot props is probably not 100% yet. it’s something we unfortunately can’t autogenerate yet.
Hello,
Have been trying to use this solution for vuetify 2.2.14 but came up with ‘value’ undefined
https://codepen.io/josephgunawan/pen/KKpajYe
Did i do something wrong? Need some solution. Thank you