Skip to content

How to conditionally hide a Workbook.Column from dispay #26

Open
@coolbeatz71

Description

@coolbeatz71

I would like to hide a column using a condition:

{colToExport.created_at && (
          <Workbook.Column
            label='Date Time'
            value={(params: any) =>
              moment(params.created_at).format('MMM Do, YYYY, HH:mm')
            }
          />
        )}

But I am getting an error can't find props of null.

A quick look at the code, I can see such code: column.props.label or column.props.value.

I want whether there is a better way of doing it, or if It is possible to add another prop like hide which will receive a boolean to hide or not the ExcelColumn from export

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions