fix: DatabaseConditions height

This commit is contained in:
Nathan
2025-11-18 23:47:10 +08:00
parent b7cc0d10be
commit 3bb9236fc1
2 changed files with 6 additions and 3 deletions

View File

@@ -232,7 +232,9 @@ function DatabaseViews({
});
}, [lockedHeight, fixedHeight, isLoading, viewVisible, viewId, layout, iidIndex]);
const effectiveHeight = lockedHeight ?? fixedHeight ?? null;
// Only use locked height during transitions (isLoading) or if fixedHeight is explicitly set
// This prevents the empty space issue when filters/sorts expand/collapse
const effectiveHeight = isLoading ? (lockedHeight ?? fixedHeight ?? null) : (fixedHeight ?? null);
return (
<>
@@ -251,6 +253,7 @@ function DatabaseViews({
setSelectedViewId={handleViewChange}
viewIds={viewIds}
/>
<DatabaseConditions />
<div

View File

@@ -34,8 +34,8 @@ export function DatabaseConditions() {
return (
<div
style={{
// Keep a stable vertical footprint to avoid layout shifts between views.
height: '40px',
// Collapse to 0 height when not expanded to avoid unnecessary space
height: expanded ? '40px' : '0',
visibility: expanded ? 'visible' : 'hidden',
opacity: expanded ? 1 : 0,
pointerEvents: expanded ? 'auto' : 'none',