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

Admin: Update org list after delete #26277

Merged
merged 1 commit into from Jul 15, 2020
Merged

Conversation

Clarity-89
Copy link
Contributor

What this PR does / why we need it:

Currently the list of organisations is not updated after an organisation has been deleted, unless the page is refreshed. This PR makes sure that fetchOrgs api call happens after the deleteOrg call completed.

@Clarity-89 Clarity-89 added this to the 7.1 milestone Jul 13, 2020
@Clarity-89 Clarity-89 requested review from dprokop and a team July 13, 2020 08:12
@Clarity-89 Clarity-89 self-assigned this Jul 13, 2020
@Clarity-89 Clarity-89 requested review from peterholmberg and removed request for a team and peterholmberg July 13, 2020 08:12
@dprokop
Copy link
Member

dprokop commented Jul 13, 2020

Seems OK, but long term I think we should consider altering the local state first and then re-fetching the list. Sort of optimistic update. With the proposed solution I can see weird behaviour i.e. when the connection is slow:

Kapture 2020-07-13 at 14 05 39

@Clarity-89
Copy link
Contributor Author

Seems OK, but long term I think we should consider altering the local state first and then re-fetching the list. Sort of optimistic update. With the proposed solution I can see weird behaviour i.e. when the connection is slow:

Yeah, makes sense. But then we'll need to be able to revert the state if the api call has errors. Do we have any functionality like this available?

@dprokop
Copy link
Member

dprokop commented Jul 15, 2020

Do we have any functionality like this available?

nothing reusable unfortunately

@Clarity-89 Clarity-89 merged commit 208f95a into master Jul 15, 2020
@Clarity-89 Clarity-89 deleted the admin/fix-org-list-update branch July 15, 2020 07:35
dprokop pushed a commit that referenced this pull request Jul 16, 2020
@dprokop dprokop mentioned this pull request Jul 16, 2020
dprokop pushed a commit that referenced this pull request Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants