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

Grouped Table Will Not Render Rows with No Children #699

Closed
1 task done
robgaston1 opened this issue Apr 15, 2020 · 0 comments
Closed
1 task done

Grouped Table Will Not Render Rows with No Children #699

robgaston1 opened this issue Apr 15, 2020 · 0 comments

Comments

@robgaston1
Copy link
Contributor

robgaston1 commented Apr 15, 2020

Issue Type

  • Bug

Specs

What version are you using?
2.19.1

What browser?
Chrome

Expected Behavior

What did you expect to happen?
I am using vue-good-table with the groupOptions attribute enabled. I am passing in array of objects, some of which have children but some of which do not have children. I would like to see all rows of data, whether or not they have children.

Actual Behavior

What actually happened?
I would like to render every row that is passed in whether or not it has children. Instead, I only see the rows for which the children array has data in it, and the other rows are just missing.

An additional problem is that if you have a parent row with no children, then any rows that come after that row will not be able to properly expand and collapse. I think this is because when the vgt-expand event is emitted, it tries to match the row with an index, and the indexes might be off since not all rows are rendered.

Steps to Reproduce the Problem

Please detail your steps here
In the jsfiddle below, Senior Devs and Junior Devs are rendered because they have objects in the children array If you look at Baby Devs, it has no children and is not rendered. If you add an object there, Baby Devs will get added to the table.

I am wondering if this part of the code is what is causing this to occur

if (children.length) {

jsfiddle

If you provide a jsfiddle reproducing the issue, it'll be addressed much faster.
Here is an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant