I'm not sure if this is purely a SlickGrid issue, or Serenity is doing some sort of override.
I can't change the row height of the entity grid used by serenity, with the cell's data and input following suit. I've tried:
height by CSS of .slick-row, .slick-cell elements. The rows did not increase in height but the cell text and inputs went weird, like they're being hidden beneath their respective row's bottom border with only their top showing.rowHeight option in the grid constructor:
constructor(container: JQuery) {
super(container);
this.slickGrid.setOptions({
rowHeight: 50
});
}
How do I customize the Serene grid row heights (make higher or smaller)? This is to accomodate font changes, and/or tapping area in mobile. Thanks.
if you mean a word wrap content, this might be help https://github.com/volkanceylan/Serenity/issues/425.
cmiiw.
@adhikamafran no, not word wrap.
I meant, from this:
to this:
Ok, so I was able to do it using rowHeight slickgrid option and css (all set to !important) to override the height set in a style block (containing slickgrids' heights) that appends to the <head> element. _I'm not sure what/where is the code that executes this._
rowHeight setting in the constructor:
this.slickGrid.setOptions({
rowHeight: 50
});
.slick-row
{
height: 50px !important;
line-height: 50px !important;
> * {
height: 46px !important;
line-height: 46px !important;
}
}
.slick-cell{
border-bottom: 0px !important;
height: 50px !important;
> * {
height: 43px !important;
}
}
Just customize the sizes as you need.
Displayed as intended for now in Chrome and IE 11. I'm not sure if it reflects in ALL the grids in all modules.
Hope this helps someone out there.
There are several samples in Serene that changes row height. Proper way is to use getSlickOptions. That doesn't affect line height / editor height though, which should be set by css.
Most helpful comment
There are several samples in Serene that changes row height. Proper way is to use getSlickOptions. That doesn't affect line height / editor height though, which should be set by css.