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

kravets-levko commented Nov 24, 2019

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

This comment has been minimized.

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}

This comment has been minimized.

Copy link
@gabrieldutra

gabrieldutra Nov 24, 2019

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

This comment has been minimized.

Copy link
@kravets-levko

This comment has been minimized.

Copy link
@gabrieldutra

gabrieldutra Nov 24, 2019

Member

🤦‍♂

This comment has been minimized.

Copy link
@gabrieldutra

gabrieldutra Nov 24, 2019

Member

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

This comment has been minimized.

Copy link
@kravets-levko

kravets-levko Nov 24, 2019

Author Collaborator

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 requested a review from gabrieldutra Nov 26, 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
17 checks passed
17 checks passed
Header rules No header rules processed
Details
Pages changed All files already uploaded
Details
Datree Smart Policy Best Practices Verification
Details
Datree insights datreeio insights events
Details
Mixed content No mixed content detected
Details
Redirect rules 7 redirect rules processed
Details
WIP Ready for review
Details
build Workflow: build
Details
ci/circleci: backend-lint Your tests passed on CircleCI!
Details
ci/circleci: backend-unit-tests Your tests passed on CircleCI!
Details
ci/circleci: frontend-e2e-tests Your tests passed on CircleCI!
Details
ci/circleci: frontend-lint Your tests passed on CircleCI!
Details
ci/circleci: frontend-unit-tests Your tests passed on CircleCI!
Details
codeclimate All good!
Details
cypress: default-group 127 tests passed in 14:10
Details
deploy/netlify Deploy preview ready!
Details
percy/redash Visual review approved by Levko Kravets
Details
@kravets-levko kravets-levko deleted the fix/4393-visualization-table-children branch Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.