vue-good-table icon indicating copy to clipboard operation
vue-good-table copied to clipboard

How to column sort on basis on labels in grouped table

Open rajatjain3571 opened this issue 5 years ago • 3 comments

Issue Type (delete the irrelevant ones)

  • [x] Question

Specs

What version are you using? 2.19.3 What browser? chrome

Expected Behavior

What did you expect to happen? I have created a grouped tables without span. So each column of group has its own label. When i click on header it should sort on basis of label

Actual Behavior

What actually happened? When i click on header. It sorts children of each group

Steps to Reproduce the Problem

Please detail your steps here

  1. Create grouped table without mode ="span" pass label for each column. 2.Enable sorting 3.I can't figure out how to change sorting from sorting children to sorting on the basis of label

Example . https://jsfiddle.net/nb6fcqs7

If you see in this link, if you click Name. it will sort children of Senior Dev and Junior Dev and what i want to do is I am looking for is Senior Dev and Junior Dev sorted

rajatjain3571 avatar Jun 23 '20 18:06 rajatjain3571

hey @rajatjain3571 This is not supported on the table given that header rows may or may not match the table columns. Do you have a suggestion of how sorting of header rows should work? Specially if they don't match the columns?

xaksis avatar Jun 24 '20 23:06 xaksis

@xaksis As of now When there is grouped table and we enable sorting. it sorts data inside each group but position of group remains same. I was hoping when there is grouped table and we click on header for sorting it takes all the labels of groups and sort group instead of rows inside the group. Example for what i am looking is (Just see the output , i edited the json to show you output only) Before clicking header https://jsfiddle.net/nb6fcqs7 After clicking header https://jsfiddle.net/8w9mhqjc/

rajatjain3571 avatar Jun 29 '20 19:06 rajatjain3571

Hey @xaksis, I'm actually looking for this feature, I was wondering if there's any update on it ? or if I should start working on a it ? :)

On my side, I would sort headers & rows inside the group aswell.

Thanks for taking time

atomickxx avatar Oct 18 '20 18:10 atomickxx