mirror of
https://github.com/apache/superset.git
synced 2024-09-16 02:29:39 -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 })}>
|
<Wrapper className={cx({ open: filtersOpen })}>
|
||||||
<StickyContainer>
|
<StickyContainer>
|
||||||
<Sticky topOffset={-topOffset} bottomOffset={Infinity}>
|
<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}
|
{children}
|
||||||
</Contents>
|
</Contents>
|
||||||
)}
|
)}
|
||||||
|
@ -61,8 +61,7 @@ const Bar = styled.div`
|
|||||||
width: ${barWidth}; // arbitrary...
|
width: ${barWidth}; // arbitrary...
|
||||||
background: ${({ theme }) => theme.colors.grayscale.light5};
|
background: ${({ theme }) => theme.colors.grayscale.light5};
|
||||||
border-right: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
border-right: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
max-height: 100%;
|
|
||||||
display: none;
|
display: none;
|
||||||
/* &.animated {
|
/* &.animated {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user