import ArrowDownwardIcon from "@material-ui/icons/ArrowDownward";
import { createTree } from "models/tree";
import { DataTableMultiselectOption } from "../data-table-multiselect-popover/data-table-multiselect-popover";
+import { PendingIcon } from "components/icon/icon";
export type DataColumns<I, R> = Array<DataColumn<I, R>>;
if (prevProps.currentRoute !== this.props.currentRoute) {
this.initializeCheckedList([])
}
- if((prevProps.working === true && this.props.working === false || this.props.items.length > 0) && !this.state.isLoaded) {
+ if(prevProps.working === true && this.props.working === false) {
+ this.setState({ isLoaded: true });
+ }
+ if((this.props.items.length > 0) && !this.state.isLoaded) {
this.setState({ isLoaded: true });
}
}
const { isLoaded } = this.state;
if (columns[0].name === this.checkBoxColumn.name) columns.shift();
columns.unshift(this.checkBoxColumn);
- console.log(items)
return (
<div className={classes.root}>
<div className={classes.content}>
const { isLoaded } = this.state;
const { working, isNotFound } = this.props;
const dirty = columns.some(column => getTreeDirty("")(column.filters));
- console.log('isNotFound', isNotFound, 'isLoaded', isLoaded, 'working', working, )
if (isNotFound && isLoaded) {
return (
<DataTableDefaultView
icon={this.props.defaultViewIcon}
- messages={["Item not found"]}
+ messages={["No items found"]}
/>
);
} else
if (isLoaded === false || working === true) {
return (
<DataTableDefaultView
- icon={this.props.defaultViewIcon}
+ icon={PendingIcon}
messages={["Loading data, please wait"]}
/>
);
} else {
- //if (isLoaded && !working && !isNotFound)
+ // isLoaded && !working && !isNotFound
return (
<DataTableDefaultView
icon={this.props.defaultViewIcon}
);
renderBodyRow = (item: any, index: number) => {
- console.log('item', item)
const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid, currentRoute } = this.props;
return (
<TableRow