Multiple row grouping

UI Components for Vue
Post Reply
Vissstors
Posts: 2
Joined: 19 Jun 2022, 06:04

19 Jun 2022, 06:14

I need to know how to implement the multiple way of grouping rows, since the documentation indicates that it is possible, however, there is no example where an array of fields is used for the groupRowsBy property, and although I try, I can not do that works. Somebody could help me? Thanks

Vissstors
Posts: 2
Joined: 19 Jun 2022, 06:04

20 Jun 2022, 23:26

I found the solution!

I'll leave it here in case someone needs it:

You need to simply define two arrays like this:

Code: Select all

groupRowsBy: ["columnName1", "columnName2"]
multiSortMeta: [{field: 'columnName1', order: 1}, {field: 'columnName2', order: -1}]
Then, you need to bind the two arrays to the corresponding properties, like this:

Code: Select all

rowGroupMode="rowspan" :groupRowsBy="groupRowsBy" sortMode="multiple" :multiSortMeta="multiSortMeta"
That's it!

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

01 Jul 2022, 11:27

That sounds good!

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests