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

[Grouping] treeRowHeaderAlwaysVisible not working as expected #3572

Closed
AgDude opened this issue May 23, 2015 · 2 comments · Fixed by #3573
Closed

[Grouping] treeRowHeaderAlwaysVisible not working as expected #3572

AgDude opened this issue May 23, 2015 · 2 comments · Fixed by #3573

Comments

@AgDude
Copy link
Contributor

AgDude commented May 23, 2015

My expectation with this option is that when set to false, the "plus" column will be removed/added based on whether or not grouping is active. This does not appear to be working.

@AgDude
Copy link
Contributor Author

AgDude commented May 23, 2015

@PaulL1 I have been working a bit on this. The core problem is solved by resetting grid.treeBase.numberLevels to 0 at the beginning of the createTree method. But then we run into the problem that we are considering a single grouping to have 0 numberLevels, which is also the default without any grouping.

I am going to change this so numLevels becomes 1 if there is a single grouped column. Alternatively we could make it undefined if there are no grouped columns.

AgDude added a commit to AgDude/ui-grid that referenced this issue May 23, 2015
Change the treeBase.numberLevels variable to consider a single level as 1 instead of 0
Previously there was no way to use this variable to differentiate between a single tree level
and no grouping at all. This does not impact row.treeLevel, which is still zero-based.

Reset treeBase.numberLevels each time the tree is created.

Remove unneeded dependency for groupingService in treeBase.uiGridViewport directive

Add treeRowHeaderAlwaysVisible=false option to complex grouping tutorial (320).

Fixes: angular-ui#3572
@PaulL1
Copy link
Contributor

PaulL1 commented May 23, 2015

Sounds reasonable. I don't think I did it deliberately, I recall noticing it had ended up zero based then just going with it.

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

Successfully merging a pull request may close this issue.

2 participants