<b-table>: can you target the `tbody` element to apply an event handler?
See original GitHub issueAs it is, i can create a slot
and slot-scope
it to the row
or cell
and then add an event listener to an object inserted into that cell
or row
(most obviously is @click
event on a button
inside of a table cell
) but how can i scope a slot
to the <tbody>
or target the <tbody>
and add an event to it?
in my application i’d want to add an @scroll
event to the <tbody>
… adding @scroll the the <b-table>
doesn’t work. trying to scope a slot to the <tbody>
doesn’t work since 'body
’ is not an accepted argument for <b-table>
scoped-slot
argument. (row
, cell
, data
are however)
if this is not possible can i propose a change to scoped slots to allow for scoping to 'body'
or 'tbody'
?
kind of interesting i can add events to row
or to cell
but not to the table itself.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Not the element itself, but the scroll event triggered from the tbody.
Basically we could do this inside of the
b-table
component:and you would do this when using it:
BootstrapVue 2.0.0-rc.28 (released today) introduces a new component
<b-table-simple>
which gives you control over the rendering of the table. You will need to handle managing your items and fields manually… but it is an alternative option.