-
Hi! Is there a way where I can make the responsive? I've tried with overflowX="scroll" but I don't know if I did it right. Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 10 replies
-
Can you share a codesandbox of your table? |
Beta Was this translation helpful? Give feedback.
-
Were you able to get the Table to be responsive? Facing the same issue |
Beta Was this translation helpful? Give feedback.
-
does someone has solved the issue? |
Beta Was this translation helpful? Give feedback.
-
Tables are infamously difficult to actually make responsive themselves, purely by their nature. You can't really wrap the columns or anything. IMO, the best way, as OP mentioned is to use Example: https://codesandbox.io/s/responsive-table-e2h0d?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
-
Also, I used react-table with Chakra-ui and the Table component doesn't propagate props to it's children, I had to use Box as={Table} to make it work. |
Beta Was this translation helpful? Give feedback.
-
In case anyone else is still having this issue, you can also just wrap the table in a responsive element such as <Box overflow={'scroll'}>
<Table variant="striped" colorScheme="cyan" overflow={'scroll'}> |
Beta Was this translation helpful? Give feedback.
-
For React + Chakra UI v. 0.8 |
Beta Was this translation helpful? Give feedback.
-
Hey folks, I've created a gist with a different way to create responsive tables using Chakra UI. Take a look and share your thoughts! https://gist.github.com/gneutzling/2e8447e4ead4017e5302d04f90e79432 Ps.: still need to improve table styles. |
Beta Was this translation helpful? Give feedback.
-
You have multiple options available. To ensure responsiveness and control over the layout, you can utilize the overflow property with the value auto to add scroll bars when necessary, and the max-width property to set a maximum value for the element's width.
|
Beta Was this translation helpful? Give feedback.
Also, I used react-table with Chakra-ui and the Table component doesn't propagate props to it's children, I had to use Box as={Table} to make it work.