mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
Fix Filter Bar scrolling (#12156)
This commit is contained in:
parent
8682c6fc1c
commit
942e3210b5
@ -73,8 +73,28 @@ export const StickyVerticalBar: React.FC<SVBProps> = ({
|
||||
<Wrapper className={cx({ open: filtersOpen })}>
|
||||
<StickyContainer>
|
||||
<Sticky topOffset={-topOffset} bottomOffset={Infinity}>
|
||||
{({ style, isSticky }: { style: any; isSticky: boolean }) => (
|
||||
<Contents style={isSticky ? { ...style, top: topOffset } : null}>
|
||||
{({
|
||||
style,
|
||||
isSticky,
|
||||
distanceFromTop,
|
||||
}: {
|
||||
style: any;
|
||||
isSticky: boolean;
|
||||
distanceFromTop: number;
|
||||
}) => (
|
||||
<Contents
|
||||
style={
|
||||
isSticky
|
||||
? {
|
||||
...style,
|
||||
top: topOffset,
|
||||
height: `calc(100vh - ${topOffset}px)`,
|
||||
}
|
||||
: {
|
||||
height: `calc(100vh - ${distanceFromTop}px)`,
|
||||
}
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</Contents>
|
||||
)}
|
||||
|
@ -61,8 +61,7 @@ const Bar = styled.div`
|
||||
width: ${barWidth}; // arbitrary...
|
||||
background: ${({ theme }) => theme.colors.grayscale.light5};
|
||||
border-right: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 100%;
|
||||
display: none;
|
||||
/* &.animated {
|
||||
display: flex;
|
||||
|
Loading…
Reference in New Issue
Block a user