react-chrono icon indicating copy to clipboard operation
react-chrono copied to clipboard

Update in Map Array

Open junior-jornada opened this issue 3 years ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Update list of objects

Expected behavior When updating a list of objects in order to update the timeline it does not work.

Desktop (please complete the following information):

  • Browser [chrome, safari]

Example Code

 <Chrono
   mode="VERTICAL"
   allowDynamicUpdate={true}
 >
  {kitBudget.map((item) => (
      <VStack>
        <Container minW="3xl" bg="green.400" color="#262626">
          {item.product.id}
        </Container>
      </VStack>
      ))}                
</Chrono>

Gambiarra Solution (workaround):

  • Add key={Math.random() * 1000}

junior-jornada avatar Sep 30 '22 13:09 junior-jornada

Neither for me. It's very strange that the library does not support the basic Array.map function which React Developers use very often. No way, it should be called "react-chrono".

collab-with-tushar-raj avatar Jun 06 '24 10:06 collab-with-tushar-raj