FIX: Prevent negative column width, row height (#167)

* Prevent negative column width / row height in rust

* prevent in front-end
This commit is contained in:
Sinan Yumurtacı
2024-12-10 17:07:06 -06:00
committed by GitHub
parent 56915ce0b1
commit eee40c1b9a
5 changed files with 44 additions and 2 deletions

View File

@@ -104,10 +104,16 @@ function Worksheet(props: {
editor: editor,
},
onColumnWidthChanges(sheet, column, width) {
if (width < 0) {
return;
}
model.setColumnWidth(sheet, column, width);
worksheetCanvas.current?.renderSheet();
},
onRowHeightChanges(sheet, row, height) {
if (height < 0) {
return;
}
model.setRowHeight(sheet, row, height);
worksheetCanvas.current?.renderSheet();
},