Skip to content

Commit 4c65e65

Browse files
committed
Fix scrolling for QuickAdd list
1 parent 5aa6502 commit 4c65e65

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

client/modules/IDE/components/AddToCollectionList.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Loader from '../../App/components/loader';
1414
import QuickAddList from './QuickAddList';
1515

1616
const projectInCollection = (project, collection) =>
17-
collection.items.find(item => item.project.id === project.id) != null;
17+
collection.items.find(item => item.projectId === project.id) != null;
1818

1919
class CollectionList extends React.Component {
2020
constructor(props) {
@@ -81,12 +81,14 @@ class CollectionList extends React.Component {
8181
}
8282

8383
return (
84-
<div className="quick-add-wrapper">
85-
<Helmet>
86-
<title>{this.getTitle()}</title>
87-
</Helmet>
88-
89-
{content}
84+
<div className="collection-add-sketch">
85+
<div className="quick-add-wrapper">
86+
<Helmet>
87+
<title>{this.getTitle()}</title>
88+
</Helmet>
89+
90+
{content}
91+
</div>
9092
</div>
9193
);
9294
}

client/modules/IDE/components/AddToCollectionSketchList.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ class SketchList extends React.Component {
7272
}
7373

7474
return (
75-
<div className="quick-add-wrapper">
76-
<Helmet>
77-
<title>{this.getSketchesTitle()}</title>
78-
</Helmet>
79-
{content}
75+
<div className="collection-add-sketch">
76+
<div className="quick-add-wrapper">
77+
<Helmet>
78+
<title>{this.getSketchesTitle()}</title>
79+
</Helmet>
80+
{content}
81+
</div>
8082
</div>
8183
);
8284
}

client/modules/IDE/components/CollectionList/CollectionList.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,10 @@ class CollectionList extends React.Component {
170170
closeOverlay={this.hideAddSketches}
171171
isFixedHeight
172172
>
173-
<div className="collection-add-sketch">
174-
<AddToCollectionSketchList
175-
username={this.props.username}
176-
collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })}
177-
/>
178-
</div>
173+
<AddToCollectionSketchList
174+
username={this.props.username}
175+
collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })}
176+
/>
179177
</Overlay>
180178
)
181179
}

client/modules/User/components/Collection.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,10 @@ class Collection extends React.Component {
398398
closeOverlay={this.hideAddSketches}
399399
isFixedHeight
400400
>
401-
<div className="collection-add-sketch">
402-
<AddToCollectionSketchList username={this.props.username} collection={this.props.collection} />
403-
</div>
401+
<AddToCollectionSketchList
402+
username={this.props.username}
403+
collection={this.props.collection}
404+
/>
404405
</Overlay>
405406
)
406407
}

0 commit comments

Comments
 (0)