-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Is your feature request related to a problem? Please describe.
Currently, when you use AgGridPesonCell with data extraction, default filter is not working correctly,
so you have to add custom filter in order to access correct data to filter. Here is working example:
// filter
export const PersonFilter = {
filter: 'agSetColumnFilter',
filterParams: {
applyMiniFilterWhileTyping: true,
keyCreator: (params: KeyCreatorParams<ContractPersonnelRequest, ContractPerson>) => {
return params.value?.azureId || '';
},
valueFormatter: (params: ValueFormatterParams<ContractPersonnelRequest, ContractPerson>) => {
return params.value ? params.value.name : '(Blanks)';
},
} as ISetFilterParams,
};
// usage of person filter in person cell
agGridPersonCell({
field: 'person',
headerName: 'Person',
flex: 1,
azureId: (data: Person) => data.azureId,
heading: (person) => person.name,
subHeading: (person) => {
return person.mail
? `<a href="mailto:${person.mail}">${person.mail}</a>`
: 'email not available';
},
dataToSort: (data: Person) => data.name,
...PersonFilter,
}),
Describe the solution you'd like
We should maybe write generic property like for sorting, where you can choose data to use to filter and data to format
Describe alternatives you've considered
Do nothing, leave it as is
Metadata
Metadata
Assignees
Labels
No labels