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

350
Visualizações
my sorting is not working in react-data-table-component

this is the table i have and if i click any one of the heading id dosent sort

when i click on rank, location or deaths on top it used to sort the list before but now it doesn't work. The data you see is not all of the data i have used there is a few more that would just make the question long so i only added first few. Any help would be appreciated.

const

 data = [
        {
            location: 'Texas',
            deaths: '4,164',
            rank: 1
        },
        {
            location: 'California',
            deaths: '3,449',
            rank: 2
        }
    ]



  const columns = [
        {
          name: <h2>Rank</h2>,
          selector:  row => <h3>{row.rank}</h3>,
          sortable: true,
        },
        {
          name: <h2>Location</h2>,
          selector:  row => <h3>{row.location}</h3>,
          sortable: true,
        },
        {
          name: <h2>Deaths</h2>,
          selector:  row => <h3>{row.deaths}</h3>,
          sortable: true,
        }
      ];


  return (
    <div className='table_map'>
        <DataTable  
            data={data}
            columns={columns}
            print='true'
            theme="solarized"
            fixedHeader
            fixedHeaderScrollHeight="700px"
            customStyles = {customStyles }
        />
    </div>
  )
}
 
export default Table
 
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