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

185
Visualizações
react scroll to not working - horizontal scrolling

I'm trying to make the scrollTo work but from other questions I've seen it has to do with my css however none of the solutions I found worked.

I'm using react and styled components and the scroll is on the X axis

here's the react:

  return (
    <StyledBoard container>
      <StyledGrid>
        <StyledScroll>
          <StyledScrollWrapper>
            {data.map((category, i) => (
                {content}
            ))}
          </StyledScrollWrapper>
        </StyledScroll>
      </StyledGrid>
    </StyledBoard>
  );

here's the styling:

import styled from "styled-components";
import Grid from "@mui/material/Grid";
import Card from "@mui/material/Card";
import SimpleBar from "simplebar-react";

const StyledBoard = styled(Grid)`
  margin-top: 20px !important;
  margin-bottom: 8px !important;
  display: flex;
  flex-flow: row nowrap;
  overflow: auto;
`;

const StyledGrid = styled.div`
  width: 100%;
  display: flex;
`;

const StyledScroll = styled(SimpleBar)`
  height: calc(100vh - 265px);
  width: 100%;

  .simplebar-wrapper {
    height: 100%;
  }

  .simplebar-content {
    height: 100%;
  }

  .simplebar-scrollbar::before {
    background-color: ${({ theme }) => theme.colours.primary};
  }
`;

const StyledScrollWrapper = styled.div`
  display: flex;
  width: auto;
`;

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