Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it support html tables? #76

Open
kumardennis opened this issue Dec 2, 2020 · 3 comments
Open

Does it support html tables? #76

kumardennis opened this issue Dec 2, 2020 · 3 comments

Comments

@kumardennis
Copy link

It seems that i cant make it work with HTML tables (as i cant just a div outside tr). Could anyone suggest any solutions for it?

@bgbbmm
Copy link

bgbbmm commented Jan 15, 2021

this is the same problem i just ran into ... not what i was expecting

@jmayergit
Copy link

jmayergit commented Jun 3, 2021

You can use the render function to determine what Draggable and or Container get rendered as. In this case if you were to have draggable table body rows

<Container
   render={(ref) => (
     <tbody ref={ref}>
       <Draggable
         render={() => (
           <tr><td>some data</td></tr>
         )}
       />
     </tbody>
   )}
</Container>

Might contain typ0s

@biasedzeus
Copy link

biasedzeus commented Aug 1, 2024

Also dont forget when rendering explicity through draggable change its display type to display: table-row as this will mess up your table UI as draggable overwrites it to display: block .

Dont forget to pass ref to the tbody and change display of <tr/> to table-row

<Container render={(ref) => ( <tbody ref={ref}> <Draggable render={() => ( <tr style={{display:'table-row'}}><td>some data</td></tr> )} /> </tbody> )} </Container>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants