Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
if (!isLoading && (ids.length === 0 || total === 0)) {
return null;
}
/**
* After the initial load, if the data for the list isn't empty,
* and even if the data is refreshing (e.g. after a filter change),
* the datagrid displays the current data.
*/
return (
{expand && (
<table style="{{">
<thead>
<tr><th>
)}
{hasBulkActions && (
</th><th>
0
&& ids.length > 0
&& !ids.find(
it => selectedIds.indexOf(it) === -1
)</th></tr></thead></table>
children,
showFilter,
hideFilter,
displayedFilters,
filterValues,
...rest
} = this.props;
return (
);
}
showFilter,
filterValues,
setFilters,
...rest
} = this.props;
return (
);
}
displayedFilters,
showFilter,
filterValues,
setFilters,
...rest
} = this.props;
return (
);
}
showFilter,
filterValues,
setFilters,
...rest
} = props;
return (
);
};
bulkActions,
currentSort,
className,
resource,
filters,
displayedFilters,
exporter,
filterValues,
hasCreate,
basePath,
selectedIds,
onUnselectItems,
showFilter,
...rest
}) => (
{bulkActions &&
cloneElement(bulkActions, {
basePath,
filterValues,
resource,
selectedIds,
onUnselectItems,
})}
{filters &&
cloneElement(filters, {
resource,
showFilter,
displayedFilters,
filterValues,
context: 'button',
})}
leftIcon,
linkType,
onToggleItem,
primaryText,
rightAvatar,
rightIcon,
secondaryText,
selectedIds,
tertiaryText,
total,
...rest
}) => {
const classes = useStyles({ classes: classesOverride });
return (
(loading || total > 0) && (
{ids.map(id => (
{leftIcon && (
{leftIcon(data[id], id)}
)}
{leftAvatar && (
{leftAvatar(data[id], id)}
const BulkActionsToolbar = ({
basePath,
filterValues,
label,
resource,
selectedIds,
translate,
children,
...rest
}) => selectedIds.length > 0 ? (
<div>
<h2>
{translate(label, {
_: label,
smart_count: selectedIds.length,
})}
</h2>
</div>
{Children.map(children, child => cloneElement(Children.only(child), {
basePath,
filterValues,
resource,
selectedIds,
}))}
expandNode,
exporter,
hasCreate,
hasEdit,
hasList,
hasShow,
loading,
parentSource,
permanentFilter,
positionSource,
resource,
toggleNode,
total,
...rest
}) => (
{hasCreate && }
{exporter !== false && (
)}
);