Fix scrolling for QuickAdd list

This commit is contained in:
Cassie Tarakajian 2020-08-19 16:40:59 -04:00
parent 5aa65029c6
commit 4c65e6580c
4 changed files with 23 additions and 20 deletions

View file

@ -14,7 +14,7 @@ import Loader from '../../App/components/loader';
import QuickAddList from './QuickAddList'; import QuickAddList from './QuickAddList';
const projectInCollection = (project, collection) => 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 { class CollectionList extends React.Component {
constructor(props) { constructor(props) {
@ -81,12 +81,14 @@ class CollectionList extends React.Component {
} }
return ( return (
<div className="quick-add-wrapper"> <div className="collection-add-sketch">
<Helmet> <div className="quick-add-wrapper">
<title>{this.getTitle()}</title> <Helmet>
</Helmet> <title>{this.getTitle()}</title>
</Helmet>
{content} {content}
</div>
</div> </div>
); );
} }

View file

@ -72,11 +72,13 @@ class SketchList extends React.Component {
} }
return ( return (
<div className="quick-add-wrapper"> <div className="collection-add-sketch">
<Helmet> <div className="quick-add-wrapper">
<title>{this.getSketchesTitle()}</title> <Helmet>
</Helmet> <title>{this.getSketchesTitle()}</title>
{content} </Helmet>
{content}
</div>
</div> </div>
); );
} }

View file

@ -170,12 +170,10 @@ class CollectionList extends React.Component {
closeOverlay={this.hideAddSketches} closeOverlay={this.hideAddSketches}
isFixedHeight isFixedHeight
> >
<div className="collection-add-sketch"> <AddToCollectionSketchList
<AddToCollectionSketchList username={this.props.username}
username={this.props.username} collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })}
collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })} />
/>
</div>
</Overlay> </Overlay>
) )
} }

View file

@ -398,9 +398,10 @@ class Collection extends React.Component {
closeOverlay={this.hideAddSketches} closeOverlay={this.hideAddSketches}
isFixedHeight isFixedHeight
> >
<div className="collection-add-sketch"> <AddToCollectionSketchList
<AddToCollectionSketchList username={this.props.username} collection={this.props.collection} /> username={this.props.username}
</div> collection={this.props.collection}
/>
</Overlay> </Overlay>
) )
} }