React-table: Column Header Groups broken in 6.9.1

Created on 11 Feb 2019  Â·  10Comments  Â·  Source: tannerlinsley/react-table

I'm creating this to track a new bug that I'm seeing in 6.9.1. I understand that there may not be fixes being added except from the community for 6.x, but wanted to track this for visibility for anyone else who encounters this.

I have a reproducible example, but will have to see if I can actually find the underlying cause in terms of trying to contribute a PR to fix this.

Describe the bug
When using column header groups, a reference error is thrown:

i is not defined
makeHeaderGroups
../src/index.js:266:10

To Reproduce
Here is a very simple failing example:
https://codesandbox.io/s/p9xo6wrj8m

The header column with the nested columns is what causes the failure to occur. This previously worked in 6.8.6 and 6.9.0 (you can see this by flipping the version number back in the package.json in the example above).

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Browser: Chrome
  • Version: 71

Most helpful comment

For the issue I mentioned, technically it works in 6.9.0, but that has some of its own other issues. 6.8.6 is probably what you want.

All 10 comments

@tannerlinsley I think I know what may be going on here. The PR reverted here rolled back the method signature to makeHeaderGroups = () from makeHeaderGroups = (row, i). However, other PRs that were not reverted added in code to take advantage of that -- namely, the addition of a Key property in the returned TheadComponent: key={`${i}-${row.id}`}

I'm wondering if there are more PRs that need to be reverted to fully eliminate the recursive header groups changes that were impacting 6.9.0? That key property could just be changed/eliminated to fix this, but I'm just wondering/worried about there being other areas impacted by this as well.

Possibly. I'm not aware which ones though.

On Mon, Feb 11, 2019 at 3:09 PM Android3000 notifications@github.com
wrote:

@tannerlinsley https://github.com/tannerlinsley I think I know what may
be going on here. The PR reverted here
https://github.com/tannerlinsley/react-table/pull/1249/commits/dd192759df1d9ca7a2ab147295519eef457733d7
rolled back the method signature to makeHeaderGroups = () from makeHeaderGroups
= (row, i). However, other PRs that were not reverted added in code to
take advantage of that -- namely, the addition of a Key property in the
returned TheadComponent: key={${i}-${row.id}}

I'm wondering if there are more PRs that need to be reverted to fully
eliminate the recursive header groups changes that were impacting 6.9.0?

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/tannerlinsley/react-table/issues/1262#issuecomment-462514971,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCUGzYNKjip1lLp3VFo6MU0tMhgmBks5vMeougaJpZM4a1GoZ
.

We have had the same issue on our side. This only happens on 6.9.1.

Same issue after upgrading to 6.9.1

same issue

I turned v-6.8.1 back

it also broke resizer,

when you try to resize, column lines are broken

Anyone know what the last working version is in NPM that doesn't suffer from this issue?

For the issue I mentioned, technically it works in 6.9.0, but that has some of its own other issues. 6.8.6 is probably what you want.

6.9.2 is out now. Hopefully it fixes this problem.

Thanks! I can confirm that my CodeSandbox example is now working after updating to 6.9.2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivanov-v picture ivanov-v  Â·  16Comments

schaeffer11 picture schaeffer11  Â·  24Comments

larrybotha picture larrybotha  Â·  20Comments

Codar97 picture Codar97  Â·  17Comments

ggascoigne picture ggascoigne  Â·  18Comments