-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: indent org unit with no child and refresh lists on updates #473
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dhis2-maintenance-app-beta ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
c2dd1e1
to
3d68912
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we decide to remove the "expand"-all button as well?
@@ -53,6 +55,9 @@ export const useOnSubmitEdit = <TFormValues extends IdentifiableObject>({ | |||
message: i18n.t('Saved successfully'), | |||
success: true, | |||
}) | |||
queryClient.invalidateQueries({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes a lot of sense, however I'm not sure if we want to couple the sectionPath to the resource?
getSectionPath
is for the router, and if we in the future would want to change those paths.
I think it's more correct to use section.namePlural
if we want to do this.
Initially I was thinking to add refetchOnMount: true
on the queries for the list. That should fix the problem in this case. But I do agree that invalidating the query makes a lot of sense as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, i'll chande it to namePlural and keep it as it is then (i do like being explicit about it)
@@ -87,7 +87,9 @@ export const OrganisationUnitRow = ({ | |||
onClick={row.getToggleExpandedHandler()} | |||
></Button> | |||
</> | |||
) : null} | |||
) : ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we not decide to remove the expand all as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i can do that as well
No description provided.