Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

344
Visualizações
React Material Table Hide Column on View But Show On Export

I am creating a table that can be exportable using React Material Table. I have one column with a material icon, but it doesn't get displayed on export, so i resulted to conditional rendering, im hiding the column with the icon on export with export: true and displaying the actual text in a different column to be displayed on export for export. I have used the property hidden: true but the contents of my export do not get displayed. Do the properties hidden and export work together. Any advise on better approaches i can use will be appreciated. Thanks

Here is my code :

const columns = [
    {
      field: '',
      title: 'Variance',
      render: (list) => {
        if(list.objectives.overallStatus === 'COMPLETE' || list.objectives.overallStatus === 'Complete') {
            return (<FiberManualRecord style={{color : '#29A15B'}} />)
        }  else if(list.objectives.overallStatus === 'INCOMPLETE' || list.objectives.overallStatus === 'Incomplete' || list.objectives.overallStatus === null ) {
            return (<FiberManualRecord style={{color : '#F44336'}}/>) 
        }
      }
    },
    {
        field: 'var',
        title: 'Variance',
        export: true,
        hidden: true
        
    }
]

<MaterialTable
   title="Strategic Objective Reports."
   data={items}
   columns={columns}
   options={{
    search: true,
    sorting: true,
    pageSize: 10,
    pageSizeOptions: [10,50,100 ],
    exportButton: true
  }}

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda