Skip to content

Commit

Permalink
Merge pull request #6146 from marmelab/fix-simplelistloading-warnings
Browse files Browse the repository at this point in the history
Fix warnings when SimpleList displays skeleton while loading
  • Loading branch information
djhi authored Apr 10, 2021
2 parents 8cba994 + 650979f commit 471a076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/list/Placeholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ interface Props {
const Placeholder: FC<Props> = props => {
const classes = useStyles(props);
return (
<div className={classnames(classes.root, props.className)}>&nbsp;</div>
<span className={classnames(classes.root, props.className)}>
&nbsp;
</span>
);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/list/SimpleListLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const SimpleListLoading: FC<Props & ListProps> = props => {
return oneSecondHasPassed ? (
<List className={className} {...rest}>
{times(nbFakeLines, key => (
<ListItem>
<ListItem key={key}>
{hasLeftAvatarOrIcon && (
<ListItemAvatar>
<Avatar>&nbsp;</Avatar>
Expand Down

0 comments on commit 471a076

Please sign in to comment.