From 4c65e6580c4e4b9eca41d25804ec551265bfd26c Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 19 Aug 2020 16:40:59 -0400 Subject: [PATCH] Fix scrolling for QuickAdd list --- .../modules/IDE/components/AddToCollectionList.jsx | 14 ++++++++------ .../IDE/components/AddToCollectionSketchList.jsx | 12 +++++++----- .../components/CollectionList/CollectionList.jsx | 10 ++++------ client/modules/User/components/Collection.jsx | 7 ++++--- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/client/modules/IDE/components/AddToCollectionList.jsx b/client/modules/IDE/components/AddToCollectionList.jsx index e9417d3b..e003a896 100644 --- a/client/modules/IDE/components/AddToCollectionList.jsx +++ b/client/modules/IDE/components/AddToCollectionList.jsx @@ -14,7 +14,7 @@ import Loader from '../../App/components/loader'; import QuickAddList from './QuickAddList'; const projectInCollection = (project, collection) => - collection.items.find(item => item.project.id === project.id) != null; + collection.items.find(item => item.projectId === project.id) != null; class CollectionList extends React.Component { constructor(props) { @@ -81,12 +81,14 @@ class CollectionList extends React.Component { } return ( -
- - {this.getTitle()} - +
+
+ + {this.getTitle()} + - {content} + {content} +
); } diff --git a/client/modules/IDE/components/AddToCollectionSketchList.jsx b/client/modules/IDE/components/AddToCollectionSketchList.jsx index d4173b4b..6abb9aad 100644 --- a/client/modules/IDE/components/AddToCollectionSketchList.jsx +++ b/client/modules/IDE/components/AddToCollectionSketchList.jsx @@ -72,11 +72,13 @@ class SketchList extends React.Component { } return ( -
- - {this.getSketchesTitle()} - - {content} +
+
+ + {this.getSketchesTitle()} + + {content} +
); } diff --git a/client/modules/IDE/components/CollectionList/CollectionList.jsx b/client/modules/IDE/components/CollectionList/CollectionList.jsx index 1007ca97..3d4e1aa6 100644 --- a/client/modules/IDE/components/CollectionList/CollectionList.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionList.jsx @@ -170,12 +170,10 @@ class CollectionList extends React.Component { closeOverlay={this.hideAddSketches} isFixedHeight > -
- -
+ ) } diff --git a/client/modules/User/components/Collection.jsx b/client/modules/User/components/Collection.jsx index 54e87518..abcd9ce5 100644 --- a/client/modules/User/components/Collection.jsx +++ b/client/modules/User/components/Collection.jsx @@ -398,9 +398,10 @@ class Collection extends React.Component { closeOverlay={this.hideAddSketches} isFixedHeight > -
- -
+ ) }