Table Tree doesn't update

atlaskit

#1

Hi,

When using the table tree component if items prop in the rows component is changed the table is not updated with the new row elements.

This is most likely due to the fact that, in the component Items, the state is set on the componentWillMount event and never updated after that even if the prop changes.

Thank you,
André Rodrigues


#2

@jcheung could this be a bug or does the table tree component works as designed and might this be a feature request?


#3

CC-ing @tshugart who should be able to help.


#4

Hey, @andre.rodrigues, I’ve raised this internally in https://ecosystem.atlassian.net/browse/AK-4598.


#5

Hello @andre.rodrigues, thanks for raising this, it is on our radar now, however, to help our developer to better fix your particular use case, would you mind creating a code sandbox (https://codesandbox.io/s/new) where we can reproduce 100% the issue.

Thanks in advance,

Regards,

Raja


#6

Hi @rbellebon,

I have created a code sandbox where you can see the problem happening: https://codesandbox.io/s/q7zp2om1kj.
In the example a table tree should be displayed and if you click the Button “Load More Issues” more issues are added to the state of the component but none are added to the table, the workaround i have found is by changing the table tree key but if i am not mistaken this actually is the same a rendering a new table tree so might not be very efficient, You can test this but click on the other button “Change table key”.

Thank you,
André Rodrigues


#7

Hello, thanks a lot for that! I update the developer working on it and let you know

Regards,

Raja


#8

The issue is still in progress @andre.rodrigues - We need to confirm the design and requirements around the component


#9

Hello @andre.rodrigues, sorry for the late reply but it has required more work than expected but a fix will be available mid next-week.

Regards,


#10

Hi @rbellebon,

Glad to hear it, i will be waiting for it. Thanks for the fast fix.

Regards,
André Rodrigues


#11

Hello @andre.rodrigues, it was not a fast fix … Two of our engineers noticed that to fix this issue, a lot of logic should change and it has required a full rewrite of the component. the PR is up and should be landed soon -> https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/1729.

I apologise for the waiting time.

Regards,

Raja Bellebon


#12

Hi Raja Belledon,

Ah ok i miss read your last comment, i will keep an eye on the pull request and try it once its live for now i will keep using the component as it currently is and with the workaround i found.

Thank you,
André Rodrigues


#13

Sorry @andre.rodrigues to reply only now, please visit https://atlaskit.atlassian.com/packages/core/table-tree. The work has been done, I suggest you to read https://atlaskit.atlassian.com/packages/core/table-tree/docs/Migrating-to-v2 to get a grasp on what have changed.

Regards,

Raja Bellebon


#14

Hello @andre.rodrigues , did you have a chance to look at the new change?

Thanks in advance,

Regards,

Raja Bellebon