diff --git a/framework/core/js/src/forum/components/DiscussionList.js b/framework/core/js/src/forum/components/DiscussionList.js index 3ba28f807..4a7cf6d7f 100644 --- a/framework/core/js/src/forum/components/DiscussionList.js +++ b/framework/core/js/src/forum/components/DiscussionList.js @@ -4,6 +4,7 @@ import DiscussionListItem from './DiscussionListItem'; import Button from '../../common/components/Button'; import LoadingIndicator from '../../common/components/LoadingIndicator'; import Placeholder from '../../common/components/Placeholder'; +import classList from '../../common/utils/classList'; /** * The `DiscussionList` component displays a list of discussions. @@ -20,9 +21,11 @@ export default class DiscussionList extends Component { const state = this.attrs.state; const params = state.getParams(); + const isLoading = state.isInitialLoading() || state.isLoadingNext(); + let loading; - if (state.isInitialLoading() || state.isLoadingNext()) { + if (isLoading) { loading = ; } else if (state.hasNext()) { loading = Button.component( @@ -39,13 +42,15 @@ export default class DiscussionList extends Component { return
{Placeholder.component({ text })}
; } + const pageSize = state.pageSize; + return ( -
-