Skip to content

Commit

Permalink
Review isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhou committed May 23, 2019
1 parent 8c76f07 commit 4f2d985
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/simple/src/comments/CommentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const CommentGrid = ({ ids, data, basePath }) => {
const classes = useListStyles();

return (
<Grid spacing={2} container style={{ padding: '0 1em' }}>
<Grid spacing={2} container>
{ids.map(id => (
<Grid item key={id} sm={12} md={6} lg={4}>
<Card className={classes.card}>
Expand Down
1 change: 1 addition & 0 deletions examples/simple/src/comments/PostPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const PostPreview = props => {
[props.resource, props.id],
);
const version = useSelector(state => state.admin.ui.viewVersion);
const isLoading = useSelector(state => state.admin.loading > 0);

return (
<SimpleShowLayout version={version} record={record} {...props}>
Expand Down
7 changes: 3 additions & 4 deletions examples/simple/src/posts/PostCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ const SaveWithNoteButton = props => {
const { basePath, handleSubmit, redirect } = props;

const handleClick = useCallback(
() => {
return handleSubmit(values => {
() =>
handleSubmit(values => {
dispatch(saveWithNote(values, basePath, redirect));
});
},
}),
[basePath, redirect],
);

Expand Down
2 changes: 1 addition & 1 deletion examples/simple/src/posts/PostList.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const PostList = props => {
/>
}
medium={
<Datagrid rowClick={rowClick} expand={<PostPanel />}>
<Datagrid rowClick={rowClick} expand={PostPanel}>
<TextField source="id" />
<TextField
source="title"
Expand Down

0 comments on commit 4f2d985

Please sign in to comment.