Merge pull request #228 from mirumee/fix/product-list-columns

Fix column picker
This commit is contained in:
Marcin Gębala 2019-10-23 21:22:21 +02:00 committed by GitHub
commit 6bf33eb728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -44,4 +44,4 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix copy - #223, #224 by @dominik-zeglen
- Fix ui improvements - #226 by @benekex2
- Fix attribute errors - #216 by @dominik-zeglen
- Fix column picker - #228 by @dominik-zeglen

View file

@ -87,10 +87,11 @@ const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
const anchor = React.useRef<HTMLDivElement>();
const scrollPosition = useElementScroll(anchor);
const dropShadow = anchor.current
? scrollPosition.y + anchor.current.clientHeight <
anchor.current.scrollHeight
: false;
const dropShadow =
anchor.current && scrollPosition
? scrollPosition.y + anchor.current.clientHeight <
anchor.current.scrollHeight
: false;
return (
<Card className={classes.root}>