Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table visualization with column named "children" renders +/- buttons #4394

Merged
merged 2 commits into from
Nov 26, 2019

Conversation

kravets-levko
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Related Tickets & Documents

Fixes #4393

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Before:
image

After:
image

@gabrieldutra
Copy link
Member

gabrieldutra commented Nov 24, 2019

Yeah, it is supposed to be a very simple fix, I missed the part of the docs that mentioned childrenColumnName when I first read it 😅. But that surprisingly still holds the issue:

image

In the docs it seem that prop is an string array, so perhaps childrenColumnName={[]} will do it.

@@ -65,6 +65,7 @@ export default function Renderer({ options, data, context }) {
data-test="TableVisualization"
columns={tableColumns}
dataSource={preparedRows}
childrenColumnName={null}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
childrenColumnName={null}
childrenColumnName={[]}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That worked after I update Antd, maybe they changed it to allow array recently?

Copy link
Collaborator Author

@kravets-levko kravets-levko Nov 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

childrenName prop is declared as optional/nullable, but later there are no any conditions - it's just used as is - e.g. item[this.props.childrenName] - implicit cast to string. I'll try to find another solution.

@kravets-levko kravets-levko changed the title Table visualization with column named "children" renders +/- buttons (WIP) Table visualization with column named "children" renders +/- buttons Nov 24, 2019
@kravets-levko kravets-levko changed the title (WIP) Table visualization with column named "children" renders +/- buttons Table visualization with column named "children" renders +/- buttons Nov 26, 2019
@kravets-levko kravets-levko merged commit c70a48d into master Nov 26, 2019
@kravets-levko kravets-levko deleted the fix/4393-visualization-table-children branch November 26, 2019 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table visualization with column named "children" renders +/- buttons
2 participants