react-table-hoc-fixed-columns icon indicating copy to clipboard operation
react-table-hoc-fixed-columns copied to clipboard

Bugs with sub component

Open GuillaumeJasmin opened this issue 7 years ago • 5 comments

Currently, fixed columns doesn't work well with sub component.

Tests and improvement are needed.

See https://github.com/GuillaumeJasmin/react-table-hoc-fixed-columns/issues/2#issuecomment-408510564

GuillaumeJasmin avatar Aug 02 '18 20:08 GuillaumeJasmin

To solve this problem(for version 1.0.0-beta.8), you need to add a style to the SubComponent

.sub_component .rt-table {
  overflow: visible !important;
}

Example

multum avatar Aug 17 '18 17:08 multum

Thanks ! Yes it fix some issue ! :)

But in a full stable version, I think the scroll of tables must be separate, no ? Currently, table scrolls are synced, but I don't know if this behavior is really what we want ?

I don't currently work with sub component so I'm not sure what is the best.

GuillaumeJasmin avatar Aug 20 '18 21:08 GuillaumeJasmin

@GuillaumeJasmin If the subcomponent occupies the entire width of the line, it does not need its own scroll. In my opinion, everything should work fine, but I do not have the opportunity to test version 0.1

multum avatar Aug 21 '18 09:08 multum

Related to this, if the subcomponent is another react-table, the header row of that sub-component is being shifted down (see screenshot) when a row is inserted into that subcomponent table due to the updateRowsPosition function incrementing all nested header rows instead of just the header rows of the root table.

Changing the css selector to look for the header of the top level table seems to work:

const headerRows = document.querySelectorAll(`.${this.uniqClassName} > .rt-table > .rt-thead`);     

image

kapil-chandra avatar Jan 20 '20 17:01 kapil-chandra

Hi @kapil-chandra Thanks for your feedback :) I will fix it soon with your fix

GuillaumeJasmin avatar Jan 27 '20 18:01 GuillaumeJasmin