komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
769 stars 56 forks source link

Feature Request: When virtualScroll is enabled, have Summary row always be visible #418

Closed JeanCGF closed 3 months ago

JeanCGF commented 3 months ago

I know this isnt a small change, but a feature that it's missing and I would like to have is being able to keep the summary row to always be visible in case virtualScrolling is true, in the same way that the headers are fixed in place when scrolling.

komarovalexander commented 3 months ago

Hi @JeanCGF

to do that, just add

          elementAttributes: () => ({
            style: {
              position: 'sticky',
              bottom: 0,
              backgroundColor: 'white',
            },
          }),

to childComponents.summaryCell

demo https://stackblitz.com/edit/table-many-rows-ts-jdzfpv?file=Demo.tsx