Reputation: 351
I'm working on react app and I'm using React v18.2 and Material UI V5
I created a simple table with an MUI Table component and I want to display a popover for every table row when a mouse pointer hovers on a specific table row
I ended up with add a simple popover component to the last cell of each row
also, I added a slide In animation to my popover component
The problem is when the animation is being played. A horizontal scroll is added to my table
How can I remove the scroll bar?
my simple table:
my second question: how can I add a box shadow to the left and right sides of every table row? currently, the box shadow only displaying on the top and bottom of a table row
Upvotes: 1
Views: 1011
Reputation: 323
For the first question:
For the horizontal scrollbar you should add an overflow hidden (which can be overflow-x or overflow-y):
<Table sx={{ minWidth: 650, overflow: "hidden" }} aria-label="simple table">
For the second question something like this? https://codepen.io/michalkliment/pen/dWzwEG
Please only ask one question.
Upvotes: 1