Bhuvan
Bhuvan

Reputation: 4187

How to group data after cellFilter is applied UI-Grid

Does grouping always happen on the actual field data or can it be down after cellFilter is applied ?
like we can do it in filter and sorting using sortCellFiltered: true, filterCellFiltered: true

http://plnkr.co/edit/eswSZSnEgu620ft9npwy?p=preview

look at the I column the raw value is a number between 0,4 and a cellfilter is applied which change the value to true if value is 0,1,2 and false other wise. see how grouping is messed up

Upvotes: 2

Views: 535

Answers (1)

Adi Prasetyo
Adi Prasetyo

Reputation: 1042

FYI the grouping is still Beta at this time. Also you may take alook at this issue. I also have a couple of note

  • priority start at 0, see here.
  • type is required on sort, see here. It's doesn't not cost you much to specify that, to avoid unexpected behaviour.

Possible approach :

use the angular filter directly after XHR call resolve like so

data[i].i= $filter('reverse')(data[i].i);

http://plnkr.co/edit/9tMwY4?p=preview

It may not answer your question but i hope it help.

Upvotes: 3

Related Questions