ra-customizable-datagrid icon indicating copy to clipboard operation
ra-customizable-datagrid copied to clipboard

Can't hide/show FunctionFields

Open ericwb opened this issue 5 years ago • 2 comments

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.

ericwb avatar Jun 13 '19 00:06 ericwb

I was able to make show/hide of FunctionField work by adding a source prop.

aliang avatar Aug 21 '19 22:08 aliang

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.

ericwb avatar Aug 22 '19 17:08 ericwb