elementPath?: string;
isMSToolbarVisible: boolean;
checkedList: TCheckedList;
+ isNotFound?: boolean;
}
interface DataExplorerActionProps<T> {
type DataExplorerProps<T> = DataExplorerDataProps<T> & DataExplorerActionProps<T> & WithStyles<CssRules> & MPVPanelProps;
+type DataExplorerState = {
+ prevRefresh: string;
+ prevRoute: string;
+};
+
export const DataExplorer = withStyles(styles)(
class DataExplorerGeneric<T> extends React.Component<DataExplorerProps<T>> {
- state = {
- showLoading: false,
+ state: DataExplorerState = {
prevRefresh: "",
prevRoute: "",
};
// Component already mounted, but the user comes from a route change,
// like browsing through a project hierarchy.
this.setState({
- showLoading: this.props.working,
prevRoute: currentRoute,
});
}
// Component already mounted, but the user just clicked the
// refresh button.
this.setState({
- showLoading: this.props.working,
prevRefresh: currentRefresh,
});
}
- if (this.state.showLoading && !this.props.working) {
- this.setState({
- showLoading: false,
- });
- }
}
componentDidMount() {
}
// Component just mounted, so we need to show the loading indicator.
this.setState({
- showLoading: this.props.working,
prevRefresh: this.props.currentRefresh || "",
prevRoute: this.props.currentRoute || "",
});
toggleMSToolbar,
setCheckedListOnStore,
checkedList,
+ working,
} = this.props;
return (
<Paper
onFiltersChange={onFiltersChange}
onSortToggle={onSortToggle}
extractKey={extractKey}
- working={this.state.showLoading}
defaultViewIcon={defaultViewIcon}
defaultViewMessages={defaultViewMessages}
currentItemUuid={currentItemUuid}
toggleMSToolbar={toggleMSToolbar}
setCheckedListOnStore={setCheckedListOnStore}
checkedList={checkedList}
+ working={working}
+ isNotFound={this.props.isNotFound || false}
/>
</Grid>
<Grid