Skip to content

Commit 0f92b89

Browse files
committed
clean up StudentOrgs' "loading" knowledge
1 parent e0a5e43 commit 0f92b89

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/views/student-orgs/list.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export class StudentOrgsView extends React.Component {
9191
}
9292

9393
componentWillMount() {
94-
this.fetchData()
94+
this.fetchData().then(() => {
95+
this.setState(() => ({loading: false}))
96+
})
9597
}
9698

9799
fetchData = async () => {
@@ -116,7 +118,7 @@ export class StudentOrgsView extends React.Component {
116118

117119
const sorted = sortBy(withSortableNames, '$sortableName')
118120
const grouped = groupBy(sorted, '$groupableName')
119-
this.setState(() => ({orgs: sorted, results: grouped, loading: false}))
121+
this.setState(() => ({orgs: sorted, results: grouped}))
120122
}
121123

122124
refresh = async () => {

0 commit comments

Comments
 (0)