Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont show placeholders in dashboard during loading #7166

Merged
merged 2 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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