Couple of questions.
We've got a dropdown column configured along these lines:
const idValueMap = {
id1: 'One',
id2: 'Two'
};
const items = [
{ value: 'id1', text: 'One' },
{ value: 'id2', text: 'Two' }
];
const column = {
field: 'assignedTo',
text: 'Assigned to',
editor: {
items: items,
type: 'dropdown',
filterOperator: '*'
},
renderer: ({ value }) => idValueMap[value]
}
The challenge comes when we want to either sort or filter.
When sorting, we expect the column to be sorted by the displayed value returned by the renderer (ie One, Two), but it's actually sorted by the underlying value (id1, id2). (In this example, no difference, in the real app there is differences).
When filtering, we expect the filter editor to display the value returned from the renderer (eg 'One'), but it actually displays the underlying value (eg id1).