Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added users edit form #10

Merged
merged 4 commits into from
Feb 4, 2025
Merged

added users edit form #10

merged 4 commits into from
Feb 4, 2025

Conversation

julienjme
Copy link
Collaborator

@julienjme julienjme commented Feb 4, 2025

@julienjme julienjme marked this pull request as ready for review February 4, 2025 09:55
@julienjme julienjme requested a review from slax57 February 4, 2025 09:56
src/App.tsx Outdated Show resolved Hide resolved
src/users/UserEdit.tsx Outdated Show resolved Hide resolved
src/users/UserEdit.tsx Outdated Show resolved Hide resolved
@julienjme julienjme requested a review from slax57 February 4, 2025 11:39
@@ -31,7 +31,7 @@ const postFilters = [

export const GameList = () => (
<List filters={postFilters}>
<Datagrid>
<Datagrid isRowSelectable={() => false}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use bulkActionButtons={false} instead (it completely hides the checkboxes)

Suggested change
<Datagrid isRowSelectable={() => false}>
<Datagrid bulkActionButtons={false}>

@@ -22,7 +22,7 @@ const postFilters = [

export const UserList = () => (
<List filters={postFilters}>
<Datagrid>
<Datagrid isRowSelectable={() => false}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Datagrid isRowSelectable={() => false}>
<Datagrid bulkActionButtons={false}>

});

export const UserEdit = () => (
<Edit resource="users" redirect="/users_view">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add mutationOptions to provide a onSuccess with a refresh()

https://marmelab.com/react-admin/Edit.html#mutationoptions

});

export const UserEdit = () => (
<Edit resource="users" redirect="/users_view">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to change the redirect on the DeleteButton

@slax57 slax57 merged commit a18439e into main Feb 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants