Exclude From Group

data = [ 
{id: 1, year: "1997", title: "Final Fantasy 7"},
{id: 2, year: "1997", title: "GoldenEye"},
{id: 3, year: "", title: "Working Title"}
]

$group {
by: o => o.year,
map: { year: ["year"] }

This will create two groups in a “treetable” view. How do I exclude the object with id=3? I would like that to occupy it’s own row in the table without any grouping applied.

Thanks.

Hello,

Unfortunately, there is no way to ignore a field from the data grouping - the rules of built-in client-side grouping are quite strict.
The only feasible solution here is to group the data on the server before loading or pre-process it manually on the client.

I believe this is now a feature in 6.3?

Hi @zpetit

Yes, the feature was added in the recent release and the syntax is described here.

In a custom grouping function, you need to return false for some data object in order to exclude it from the grouping:

https://snippet.webix.com/6q1195yr

Also, a short definition - grouping function without parameters such as map, etc.

https://snippet.webix.com/ofz2qyr4