Skip to content

Commit

Permalink
dont show placeholders in dashboard during loading (#7166)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippotto authored Jun 22, 2023
1 parent a18ccd5 commit 16e0bbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions frontend/javascripts/dashboard/dashboard_task_list_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ class DashboardTaskListView extends React.PureComponent<Props, State> {
});
}

// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'pageNumber' implicitly has an 'any' typ... Remove this comment to see the full error message
fetchNextPage = async (pageNumber) => {
fetchNextPage = async (pageNumber: number) => {
// this refers not to the pagination of antd but to the pagination of querying data from SQL
const isFinished = this.state.showFinishedTasks;
const previousTasks = this.getCurrentModeState().tasks;
Expand Down
3 changes: 2 additions & 1 deletion frontend/javascripts/dashboard/dataset_folder_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ function DatasetFolderViewInner(props: Props) {
hierarchy != null &&
hierarchy.flatItems.length === 1 &&
context.datasets.length === 0 &&
context.activeFolderId != null
context.activeFolderId != null &&
!context.isLoading
) {
// Show a placeholder if only the root folder exists and no dataset is available yet
// (aka a new, empty organization)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ class ExplorativeAnnotationsView extends React.PureComponent<Props, State> {
};

getEmptyListPlaceholder = () => {
return (
return this.state.isLoading ? null : (
<Row gutter={32} justify="center" style={{ padding: 50 }}>
<Col span="6">
<Card bordered={false} cover={<i className="drawing drawing-empty-list-annotations" />}>
Expand Down

0 comments on commit 16e0bbf

Please sign in to comment.