Skip to content
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

Sorting Issue with CvDataTable in Carbon Design System + Vue 3 #1560

Closed
hgwrtsdev opened this issue Nov 27, 2023 · 2 comments
Closed

Sorting Issue with CvDataTable in Carbon Design System + Vue 3 #1560

hgwrtsdev opened this issue Nov 27, 2023 · 2 comments

Comments

@hgwrtsdev
Copy link

hgwrtsdev commented Nov 27, 2023

Hi Carbon Design System team,

Description:
I am urgently reaching out regarding a critical issue with the CvDataTable component in the Carbon Design System + Vue 3. The sorting functionality, expected to be triggered when clicking on the column headers, is malfunctioning. Despite the sorting icons transitioning, the data remains unsorted.

Steps to Reproduce:

  1. Visit the official documentation/demo for Carbon Design System + Vue 3: https://vue.carbondesignsystem.com/.
  2. Navigate to the CvDataTable section.
  3. Click on the column headers to trigger sorting.

Expected Behavior:
The data in the CvDataTable should be sorted based on the selected column.

Actual Behavior:
The sorting icons transition, but the data does not get sorted.

Environment:
Carbon Components version: ^10.58.10
@carbon/vue version: ^3.0.9
Vue version: ^3.2.13

Additional Context:
This sorting functionality is crucial for our project, and we rely heavily on the CvDataTable component. Unfortunately, downgrading to version 2+ is not a viable solution due to compatibility issues with other dependencies.

I appreciate your attention to this matter, and I understand the importance of ensuring a smooth experience with Carbon Design System components. Please let me know if any additional information is needed or if I can assist in any way.
Or if anyone has the same problem, how did you solve it?

@davidnixon
Copy link
Collaborator

@hgwrtsdev Just saw this today. So sorry for delay. Its true that the story does not sort the items in the table so I can see that is confusing. Clicking on the header does issue a sort event to which the user of the component (you) is expected to respond. See note here: https://vue.carbondesignsystem.com/?path=/docs/component-cvdatatable--default-story

Sorting, filtering and pagination are the responsibility of the component user. This component raises events to facilitate this.

I'm going to update the story a bit to make this clear.

Example event from clicking the "Name" header.

image

@davidnixon davidnixon self-assigned this Dec 8, 2023
davidnixon added a commit to davidnixon/carbon-components-vue that referenced this issue Dec 8, 2023
@davidnixon
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants