Comments (3)
Can you update the example to show what you want to achieve after applying the fix? Maybe there is already a way to get that.
from material-ui.
Sample is updated to show what i would expect.
Basicly I would expect to still be able to see both headers after scrolling.
from material-ui.
it appears that the issue arises because both header rows are using position: sticky
with the same top: 0
value, causing them to overlap when scrolling. To fix this maybe we can adjust the top
values for each header row to ensure they stack properly without overlapping. Here's a CSS suggestion:
TableHead {
.MuiTableCell-root {
position: sticky;
top: 0; // Keep this for the first header row
z-index: 10; // Ensures this row stays on top when scrolling
}
.MuiTableRow-root:first-of-type .MuiTableCell-root {
top: 0; // First header row
}
.MuiTableRow-root:last-of-type .MuiTableCell-root {
top: 56px; // Adjust this value based on the actual height of your first header row
}
}
from material-ui.
Related Issues (20)
- disableScrollLock doesn't work for Select when wrapper's overflow=hidden
- [icons] Material Icons do not support Joy UI's "danger" color prop
- Minimizing bundle using 'babel-plugin-import' results in 'Cant Resolve...' errors
- The text field label and helper text flicker and change color when another text field is focused.
- ThemeOptions Ownerstate for MuiOutlinedInput does not contain correct values
- Autocomplete resizes on hover/focus when displayed in a table with table-layout: auto set
- Cannot change displayedRows child component from <p> to <div> HOT 1
- [system] `sx` field border{Block,Inline}{,Start,End}Color doesn't take the theme into account
- Bad link for Rating component to react docs.
- [TextField] Textfield as a Select shows an empty menu when items get removed dynamically
- [lab][TabPanel] Widen type of `value` to match `@mui/base` TabPanel and related components HOT 2
- [material-ui][Divider] Add "wavy" variant HOT 1
- [Migration] theme.spacing is not a function
- Stepper does not generate a utility class for nonLinear HOT 2
- [docs-infra] JSDoc links are broken HOT 4
- Handling Long Placeholder Text in MUI Input Components
- [docs] Demo EnhancedTable crashes
- `color`="inherit"` is inconsistent between ThemeProvider and experimental_CssVarsProvider
- [core] Remove `any` from `React.ReactElement` types
- [core] Support React 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.