carbon-components-vue icon indicating copy to clipboard operation
carbon-components-vue copied to clipboard

[cv-data-table-row] event listeners is not working as expected

Open dogukanoksuz opened this issue 2 years ago • 1 comments

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

image

dogukanoksuz avatar Mar 16 '22 09:03 dogukanoksuz

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.

dogukanoksuz avatar Mar 16 '22 11:03 dogukanoksuz