Currently, Table component assumes that columns will not contain an id and that accessor will be used as default for the id in headerGroups. However, if columns contain an id that is different from the accessor, this will break the identification of the last sticky column to apply the padding. This PR fixes that by searching the last sticky column by id first, and defaulting to accessor if not defined.
Also, this PR updates the element search for the headers to compute the style for the sticky columns to search only inside the tableContainer element, instead of the whole page, to avoid conflicts with other tables in the same page.
Currently,
Table
component assumes thatcolumns
will not contain an id and thataccessor
will be used as default for the id inheaderGroups
. However, ifcolumns
contain an id that is different from the accessor, this will break the identification of the last sticky column to apply the padding. This PR fixes that by searching the last sticky column by id first, and defaulting to accessor if not defined.Also, this PR updates the element search for the headers to compute the style for the sticky columns to search only inside the
tableContainer
element, instead of the whole page, to avoid conflicts with other tables in the same page.