mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-30 03:18:02 +08:00
fix: DatabaseConditions height
This commit is contained in:
@@ -232,7 +232,9 @@ function DatabaseViews({
|
|||||||
});
|
});
|
||||||
}, [lockedHeight, fixedHeight, isLoading, viewVisible, viewId, layout, iidIndex]);
|
}, [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 (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -251,6 +253,7 @@ function DatabaseViews({
|
|||||||
setSelectedViewId={handleViewChange}
|
setSelectedViewId={handleViewChange}
|
||||||
viewIds={viewIds}
|
viewIds={viewIds}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DatabaseConditions />
|
<DatabaseConditions />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export function DatabaseConditions() {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
// Keep a stable vertical footprint to avoid layout shifts between views.
|
// Collapse to 0 height when not expanded to avoid unnecessary space
|
||||||
height: '40px',
|
height: expanded ? '40px' : '0',
|
||||||
visibility: expanded ? 'visible' : 'hidden',
|
visibility: expanded ? 'visible' : 'hidden',
|
||||||
opacity: expanded ? 1 : 0,
|
opacity: expanded ? 1 : 0,
|
||||||
pointerEvents: expanded ? 'auto' : 'none',
|
pointerEvents: expanded ? 'auto' : 'none',
|
||||||
|
|||||||
Reference in New Issue
Block a user