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

[BUG] headerRowHeight isn't working #3665

Closed
YonatanKra opened this issue Jun 2, 2015 · 7 comments
Closed

[BUG] headerRowHeight isn't working #3665

YonatanKra opened this issue Jun 2, 2015 · 7 comments
Assignees
Milestone

Comments

@YonatanKra
Copy link
Contributor

I've just tried playing with headerRowHeight, with no success - the height remains the same.
There's also no example for this in the tutorial, but it does appear in the documentation: http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions
In addition, I'm checking showHeader - when checking headerRowHeight, it stays 30 no matter what - even when I set showHeader to false (which is supposed to set headerRowHeight to 0...).
You can see the headerRowHeight value in the console after clicking the toggle button. It's always 30.
Here's the plnkr:
http://plnkr.co/edit/CPzoOkEQ3VnK4oa6a5pA?p=preview

@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

@yccteam see #2822. That section of the docs needs to be removed. Setting headerRowHeight in the grid options hasn't worked all the way back to RC.12.

You can set the header height by giving your header row cells a fixed height, as in this plunker: http://plnkr.co/edit/WqBAed2H4vELJwtdMlyM?p=preview Does that make sense? I can add a tutorial for this, or update the custom header one with the needed info.

Also showHeader seems to work for me in your plunker. In the top grid it's false and the header does not show up.

@c0bra c0bra self-assigned this Jun 2, 2015
@YonatanKra
Copy link
Contributor Author

I see -
Regarding showHeader - I was noting on the documentation error (it's also written in the code itself several times - https://github.com/angular-ui/ng-grid/search?utf8=%E2%9C%93&q=headerRowHeight&type=Code).
In addition, in the docs it says that headerRowHeight would be set to 0 if showHeader is set to false (http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions).
Other than that it's working.

Regarding using css for the row height - fine by me :)

@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

With your plunker the header height is coming out as 0 when I click the "Toggle" button. Are you not seeing that?

@YonatanKra
Copy link
Contributor Author

Strange... It shows correctly now.
Must have looked at a different version when I did my test
Sorry about that.

@YonatanKra
Copy link
Contributor Author

One more thing, if we're at it - when I set:
#grid1 .ui-grid-header-cell { height: 0; }
It doesn't work. I'm trying to hide/show the header row dynamically using this method. Is there a different method for this?

@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

Hmm, the grid must resize the header to fit the contents somehow. Any value less than 30px gets reset to 30, looks like.

You could use showHeader: false for hiding the header and the CSS method for making it larger than normal, but that's kind of dissonant...

@YonatanKra
Copy link
Contributor Author

Now I see where my problems stem from. I'm using an unstable version that's about a month old. I see this method works fine: http://plnkr.co/edit/BDTschDHPCt88casKbHb?p=preview

@c0bra c0bra added this to the 3.0 milestone Jun 11, 2015
@c0bra c0bra closed this as completed in e31b759 Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants