kendo-react icon indicating copy to clipboard operation
kendo-react copied to clipboard

Grid header and content TABLE elements have different "display" value, which causes misalignment on horizontal scrolling

Open kdikov82 opened this issue 2 years ago • 1 comments

In the following example, which has 800 columns, scrolling horizontally will start introducing misalignment between the header and the data cells:

The problem is due to the fact that the data table is with "display: block" and the header table is "display: table". For some reason, even with explicit width and the same width columns, etc., the width of the header table is with different width and those few pixels breaks the alignment.

Setting the "display: block" to the header table or setting "display: table!important" to the data table resolves the issue:

            <style>
            .k-grid-header-wrap table{ 
                display: block;
            } 

or

 .k-grid-table{
                display: table!important;
            }

https://stackblitz.com/edit/react-u6s5vf-tecr1e?file=app%2Fmain.jsx,index.html

kdikov82 avatar Jun 09 '22 12:06 kdikov82

The different "display" for both tables causes horizontal scrolling issue in Safari as well: https://stackblitz.com/edit/react-k3y3cj?file=index.html

kdikov82 avatar Jul 22 '22 11:07 kdikov82