carbon-components-vue
carbon-components-vue copied to clipboard
[cv-data-table-row] event listeners is not working as expected
Detailed description
Describe in detail the issue you're having.
CV Data Table Rows is not clickable with an event.
Is this a feature request (new component, new icon), a bug, or a general issue?
A bug
Is this issue related to a specific component?
Yes, cv-data-table > cv-data-table-row
What did you expect to happen? What happened instead? What would you like to see changed?
expected v-on:click event to work but it's doing nothing.
What browser are you working in?
Chrome Latest
What version of the Carbon Design System are you using?
"@carbon/vue": "^2.40.0",
Additional information
- Screenshots or code
To fix this issue;
File: _cv-data-table-row-inner.vue
From:
<tr
class="cv-data-table-row-inner"
:class="{
[`${carbonPrefix}--parent-row`]: expandingRow,
[`${carbonPrefix}--expandable-row`]: dataExpanded,
}"
>
To:
<tr
class="cv-data-table-row-inner"
:class="{
[`${carbonPrefix}--parent-row`]: expandingRow,
[`${carbonPrefix}--expandable-row`]: dataExpanded,
}"
v-bind="$attrs"
v-on="$listeners"
>
This problem exists because on child component you didn't register the upper component's events.