Update grid store logic

This commit is contained in:
Andrew Kingston 2025-03-04 16:58:40 +00:00
parent b2399f22a7
commit a0d363dcc5
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -36,6 +36,7 @@ const DependencyOrderedStores = [
NonPlus,
Datasource,
Columns,
Config as any,
Scroll,
Validation,
Rows,
@ -47,7 +48,6 @@ const DependencyOrderedStores = [
Users,
Menu,
Pagination,
Config as any,
Clipboard,
Notifications,
Cache,

View File

@ -58,7 +58,7 @@ export const deriveStores = (context: StoreContext) => {
width,
height,
buttonColumnWidth,
props,
config,
} = context
// Memoize store primitives
@ -98,13 +98,13 @@ export const deriveStores = (context: StoreContext) => {
// Derive vertical limits
const contentHeight = derived(
[rows, rowHeight, showHScrollbar, props],
([$rows, $rowHeight, $showHScrollbar, $props]) => {
[rows, rowHeight, showHScrollbar, config],
([$rows, $rowHeight, $showHScrollbar, $config]) => {
let height = $rows.length * $rowHeight + VPadding
if ($showHScrollbar) {
height += ScrollBarSize * 3
}
if ($props.canAddRows) {
if ($config.canAddRows) {
height += $rowHeight
}
return height