Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
Arrastra y suelta reactJs usando beautiful dnd

Estoy tratando de practicar #Arrastrar y Soltar FreeCodeCamp Así que creé un estado que incluye varios cuadros y dentro de estos cuadros, debería haber un icono que supongo que se puede mover a cualquiera de los cuadros generados, por lo que el problema con mi el código es que al elegir el ícono, muestra todas las cajas en lugar de una caja

 const [pointPlace, setPointPlace] = useState([...Array(162).keys()]); const handleOnDragEnd = result => { const items = Array.from(pointPlace); const [reorderboxes] = items.splice(result.source.index, 1); items.splice(result.destination.index, 0, reorderboxes); setPointPlace(items); }; return ( <Box> <DragDropContext onDragEnd={handleOnDragEnd}> <Droppable droppableId="pointsContainer"> {provided => ( <Box className={classes.container} display={'flex'} flexGrow={1} flexWrap={'wrap'} alignItems={'center'} justifyContent={'center'} ref={provided.innerRef} {...provided.droppableProps} > {pointPlace.map((index, id) => ( <Draggable draggableId="draggable-point" index={index} key={id}> {provided => ( <Box className={classes.box} ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}> {point} <p className={classes.boxNumber}>{index}</p> </Box> )} </Draggable> ))} </Box> )} </Droppable> </DragDropContext> </Box> );
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!