mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 19:08:33 +08:00
fix: DatabaseConditions height
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user