jack vor 1 Woche
Ursprung
Commit
5f1b846771
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      src/hooks/useImport.ts

+ 6 - 1
src/hooks/useImport.ts

@@ -1490,7 +1490,12 @@ export default () => {
                   style: borderStyle,
                   color: borderColor,
                 },
-                cellMinHeight: el.rowHeights[0] ? el.rowHeights[0] * ratio : 36,
+                cellMinHeight: (() => {
+                  const hs = (el.rowHeights || []).filter(h => typeof h === 'number' && h > 0)
+                  if (!hs.length) return 36
+                  const avg = hs.reduce((a, b) => a + b, 0) / hs.length
+                  return +(avg * ratio).toFixed(2)
+                })()
               }
               if (spid) {
                 tableElement.spid = spid