Adjust scrollHeight calculations in ObjectTable component for improved layout consistency across different environments.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-07-05 01:38:20 +01:00
parent 17c8f42493
commit 18431bf10d

View File

@ -93,7 +93,7 @@ const ObjectTable = forwardRef(
{ {
type, type,
pageSize = 25, pageSize = 25,
scrollHeight = 'calc(var(--unit-100vh) - 260px)', scrollHeight = 'calc(var(--unit-100vh) - 258px)',
onDataChange, onDataChange,
initialPage = 1, initialPage = 1,
cards = false, cards = false,
@ -132,13 +132,13 @@ const ObjectTable = forwardRef(
adjustedScrollHeight = 'calc(var(--unit-100vh) - 210px)' adjustedScrollHeight = 'calc(var(--unit-100vh) - 210px)'
} }
if (isElectron) { if (isElectron) {
adjustedScrollHeight = 'calc(var(--unit-100vh) - 244px)' adjustedScrollHeight = 'calc(var(--unit-100vh) - 238px)'
} }
if (isMobile && isElectron) { if (isMobile && isElectron) {
adjustedScrollHeight = 'calc(var(--unit-100vh) - 282px)' adjustedScrollHeight = 'calc(var(--unit-100vh) - 282px)'
} }
if (cards && isElectron) { if (cards && isElectron) {
adjustedScrollHeight = 'calc(var(--unit-100vh) - 260px)' adjustedScrollHeight = 'calc(var(--unit-100vh) - 258px)'
} }
const tableRef = useRef(null) const tableRef = useRef(null)
const model = getModelByName(type) const model = getModelByName(type)