ra-customizable-datagrid
ra-customizable-datagrid copied to clipboard
Can't hide/show FunctionFields
If I use a FunctionField in the datagrid, for example:
<FunctionField label="resources.requests.fields.estimate" render={record => "$" + (record.airfare + record.transport + record.hotel + record.meals + record.conf_ticket + record.other)} />
I cannot choose to show/hide this field. Please add support to treat FunctionFields like any column in the table.
I was able to make show/hide of FunctionField
work by adding a source
prop.
In my case, the function field is a computed value of several sources. So I can choose a source, but it only partially represent the data of the overall value. Plus, if I want the the user the ability to show/hide that source as a separate, non-FunctionField column, this will conflict with the other FunctionField as a duplicate.