When I set the padding of a cell in SpreadJs, then do an auto resize on the row, the cell shrinks to just what the padding is.
If I set no padding, then the cell auto resizes to a standard size which is what I would like to happen.
I would like the standard size of the cell to have slightly more padding than the default, is this possible but for auto resize to work as the default rather than shrinking the cell?
SpreadJs support got back to me regarding my query.
I was able to set the minRowHeight for auto fit height along with my padding to achieve what I wanted
// set the cell padding
const style = new GC.Spread.Sheets.Style();
style.cellPadding = "2";
sheet.setDefaultStyle(style, GC.Spread.Sheets.SheetArea.viewport);
const minRowHeight = 13;
const oldAutoFitHeight = GC.Spread.Sheets.CellTypes.Base.prototype.getAutoFitHeight;
GC.Spread.Sheets.CellTypes.Base.prototype.getAutoFitHeight = function (val, text, cellStyle, zoomFactor,
context) {
return Math.max(minRowHeight, oldAutoFitHeight.call(this, val, text, cellStyle, zoomFactor,
context));
}