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

148
Visualizações
Save the state of the calendar and entered data

I have a sidebar with filters on my site. One of the filters is datetime (I am using the library react-advanced-datetimerange-picker).

If the browser screen size is changed, the sidebar disappears, but a button appears that can open it again. As soon as the screen sizes change and the sidebar closes (or opens), the calendar disappears and the entered data is also lost. I would like that the calendar and the entered data are not lost depending on the screen size.

I leave a link to the code. My problem is with the FilterDateTime.js file and the DateTimeRangeContainer component. That is, when the screen size is changed, the expanded state of the calendar and the entered data are not saved.

https://codesandbox.io/s/currying-wave-uoenvx

Can this problem be solved?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need move your state to the parent of the sidebar component.

Please check.

https://codesandbox.io/s/wild-tdd-mztg0q

about 4 years ago · Juan Pablo Isaza Relatório
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