adazzle / react-data-grid

Feature-rich and customizable data grid React component
https://adazzle.github.io/react-data-grid/
Other
6.92k stars 2.18k forks source link

BUG: Freezing Columns breaks Filter rendering #1679

Closed LBWright closed 4 years ago

LBWright commented 5 years ago

Which version of React JS are you using?

✅ Officially supported ✅

⚠️ Not officially supported, expect warnings ⚠️

☣️ Not officially supported, expect warnings and errors ☣️


Which browser are you using?

✅ Officially supported ✅

⚠️ Not officially supported, but "should work" ⚠️


I'm submitting a ...

👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid? Please do not submit support request here. Instead see

https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md


Issue Details

Freezing a column breaks AutoComplete, MultiSelect and SingleSelect filters. The filters still function appropriately, however the dropdown is hidden behind the frozen columns.

Expected behavior: The dropdown filter menu appears over the column. I've attached screenshots. To reproduce, set frozen to true when defining columns and set your filter to AutoComplete, MultiSelect, or SingleSelect.

Screenshot attached. The column to the left is frozen. The Column on the right is not frozen. Screen Shot 2019-06-04 at 3 12 05 PM Screen Shot 2019-06-04 at 3 12 13 PM

kentrh commented 5 years ago

From what I can tell they both have z-index: 2; when this combination occurs.

ar2zee commented 5 years ago

From what I can tell they both have z-index: 2; when this combination occurs.

Any idea, how it can be fixed ? I already try to increase z-index for dropdown and decrease for the grid but it didn't change anything. If I change bottom for .react-grid-Viewport it fixed the problem but completely broke the UI.

ar2zee commented 5 years ago

My colleague was able to figured out the problem. It appears the grid has a stacking problem. https://philipwalton.com/articles/what-no-one-told-you-about-z-index/ If you experience the same problem you can fix it by added those css lines to you application

.react-grid-Viewport {
  z-index: 1;
}

.react-grid-Header {
  z-index: 2;
}
amanmahajan7 commented 4 years ago

This behavior should be fixed in v7 canary. Feel free to open a new issue if your run into more issues

https://github.com/adazzle/react-data-grid/blob/canary/CHANGELOG.md https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--common-features https://github.com/adazzle/react-data-grid/tree/canary/stories/demos