Skip to content

Commit

Permalink
SimpleList was using the wrong loading prop
Browse files Browse the repository at this point in the history
Since there is already an early return with the loaded prop, checking
the loading prop is not needed.
The ReviewMobileList component in the demo has also been fixed (it's
coming from the SimpleList component).
  • Loading branch information
alanpoulain committed May 30, 2020
1 parent 332335c commit c2dd003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/demo/src/reviews/ReviewListMobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const useStyles = makeStyles({
},
});

const ReviewMobileList = ({ basePath, data, ids, loading, total }) => {
const ReviewMobileList = ({ basePath, data, ids, loaded, total }) => {
const classes = useStyles();
return (
(loading || total > 0) && (
(loaded || total > 0) && (
<List className={classes.root}>
{ids.map(id => (
<Link
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/list/SimpleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const SimpleList = props => {
}

return (
(loading || total > 0) && (
(loaded || total > 0) && (
<List className={className} {...sanitizeListRestProps(rest)}>
{ids.map(id => (
<LinkOrNot
Expand Down

0 comments on commit c2dd003

Please sign in to comment.