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

[Table] Wrong Table border radius when apply background color #23835

Closed
katopz opened this issue Dec 4, 2020 · 4 comments · Fixed by #23882
Closed

[Table] Wrong Table border radius when apply background color #23835

katopz opened this issue Dec 4, 2020 · 4 comments · Fixed by #23882
Labels
component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@katopz
Copy link

katopz commented Dec 4, 2020

Problem : When apply background color to Table header, it somehow lost border radius curve.

https://material-ui.com/components/tables/#fixed-header

Screen Shot 2020-12-04 at 16 05 30

I think we need to

  • add border-top-left-radius: 4px; and border-top-right-radius: 4px; to thead
  • add border-radius: inherit; to tr and th

So we got border curve as expect.
Screen Shot 2020-12-04 at 16 20 04

@katopz katopz added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 4, 2020
@mnajdova
Copy link
Member

mnajdova commented Dec 4, 2020

@katopz can you please provide a minimal reproduction test case with v5. A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

This example may help you with customization the component - https://material-ui.com/components/tables/#customized-tables

@mnajdova mnajdova added component: table This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 4, 2020
@katopz
Copy link
Author

katopz commented Dec 4, 2020

minimal reproduction is already there with source code + live example 👉 https://material-ui.com/components/tables/#fixed-header

I can see customized-tables has rounded border or maybe it's intend to not rounded border for fixed-header and I've to customize it to be round?
Screen Shot 2020-12-04 at 17 14 28

@oliviertassinari
Copy link
Member

@katopz We could update potentially do:

diff --git a/docs/src/pages/components/tables/StickyHeadTable.tsx b/docs/src/pages/components/tables/StickyHeadTable.tsx
index 87c22f2791..fbbe3dbe0e 100644
--- a/docs/src/pages/components/tables/StickyHeadTable.tsx
+++ b/docs/src/pages/components/tables/StickyHeadTable.tsx
@@ -82,6 +82,7 @@ const rows = [
 const useStyles = makeStyles({
   root: {
     width: '100%',
+    overflow: 'hidden',
   },
   container: {
     maxHeight: 440,

to respect the <Paper> border radius.

@oliviertassinari oliviertassinari changed the title [TABLE] Wrong Table border radius when apply background color [Table] Wrong Table border radius when apply background color Dec 4, 2020
@oliviertassinari oliviertassinari added good first issue Great for first contributions. Enable to learn the contribution process. docs Improvements or additions to the documentation and removed status: waiting for author Issue with insufficient information labels Dec 5, 2020
@atnpcg
Copy link

atnpcg commented Dec 7, 2020

@oliviertassinari , thanks for the solution, I'll be creating a PR later this day to update the docs, unless someone else is working on it already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants