Update grid store logic
This commit is contained in:
parent
b2399f22a7
commit
a0d363dcc5
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue