I'm wondering how can I group the filter values of a column by a property field of a collection.
The column data:
{
users: [
{id: 1, isExternal: true, name: "John" },
{id: 2, isExternal: false, name: "George"},
{id: 3, isExternal: true, name: "Bob"}
]
}
The external users are formatted by a valueGetter function:
columnDefs: [
{
enableRowGroup: true,
field: "users",
headerName: "Users",
minWidth: 150,
filter: "agSetColumnFilter",
valueGetter: (params: any) => {
return (params.data.users || []).map((user: User) =>
user.isExternal ? `${user.name} (EXT)` : user.name
);
}
}
];
I ended up having the column filter with many checkboxes of each value.
Would it be possible to group the filter items into 1 checkbox?
For example: a checkbox filter named "External", where it would filter in all external users and when unchecked, it would display all users.