const icon = props.icon || DetailsIcon;
const filterWarning: string[] = props.filtersApplied ? ['Filters are applied to the data.'] : [];
const messages = filterWarning.concat(props.messages || ['No items found']);
- return <DefaultView {...classes} {...{ icon, messages }} />;
+ return <DefaultView data-cy="data-table-default-view" {...classes} {...{ icon, messages }} />;
});
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
);
renderBodyRow = (item: any, index: number) => {
- console.log('item', item)
const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid, currentRoute } = this.props;
return (
<TableRow