GuillaumeJasmin / react-table-sticky

Sticky hook for react-table v7
MIT License
189 stars 21 forks source link

sticky: 'right', works incorrectly, on multi-level column headers in the number of more than two. #30

Open marchenkovdmitry opened 3 years ago

marchenkovdmitry commented 3 years ago

To correct this behavior, replace rightMargin += columns[i].width in the getMarginRight method on rightMargin += columns[i]. totalWidth; I think that the design of the react-table api has changed. I attach screenshots: correct behaviour: Снимок экрана 2021-03-09 в 12 25 59 Снимок экрана 2021-03-09 в 12 26 06 incorrect behaviour: Снимок экрана 2021-03-09 в 12 26 23 Снимок экрана 2021-03-09 в 12 26 29 Снимок экрана 2021-03-09 в 12 26 36