diff --git a/news/4690.bugfix b/news/4690.bugfix new file mode 100644 index 0000000000..c7cd77a16e --- /dev/null +++ b/news/4690.bugfix @@ -0,0 +1 @@ +Fix Move to top of folder ordering in folder content view @iFlameing \ No newline at end of file diff --git a/src/components/manage/Contents/Contents.jsx b/src/components/manage/Contents/Contents.jsx index 744c794711..0e928dfc20 100644 --- a/src/components/manage/Contents/Contents.jsx +++ b/src/components/manage/Contents/Contents.jsx @@ -797,17 +797,20 @@ class Contents extends Component { onMoveToTop(event, { value }) { const id = this.state.items[value]['@id']; value = this.state.currentPage * this.state.pageSize + value; - this.props.orderContent( - getBaseUrl(this.props.pathname), - id.replace(/^.*\//, ''), - -value, - ); - this.setState( - { - currentPage: 0, - }, - () => this.fetchContents(), - ); + this.props + .orderContent( + getBaseUrl(this.props.pathname), + id.replace(/^.*\//, ''), + -value, + ) + .then(() => { + this.setState( + { + currentPage: 0, + }, + () => this.fetchContents(), + ); + }); } /**