Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
166 views
in Technique[技术] by (71.8m points)

javascript - How to override <MTableBody /> in drag and drop?

I am trying to implement drag and drop for the material UI table (https://material-table.com/#/docs/features/editable). Below code is working fine but the problem is "div" tag in the below code messing up my table (css). I don't want to give "ref" in the "div" tag instead I want to update in table body.

Kindly help me with the same.

Using "react-beautiful-dnd" for drag and drop.

Body: (props) => (
              
    
    <DragDropContext onDragEnd={onDragEnd}>
                <Droppable droppableId="droppable">
                  {(provided) => (
                     <div ref={provided.innerRef}>
                      <MTableBody {...props}/>
                       {provided.placeholder}
                     </div>
                  )}
                </Droppable>
              </DragDropContext>
              ),
question from:https://stackoverflow.com/questions/66064555/how-to-override-mtablebody-in-drag-and-drop

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...