-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
FE: Fix refetching data on window focus #380
Conversation
Have updated with the requested changes by passing a parameter to the query functions. I did want to point out that even though the Edit topic component fetches on window focus I don't see it having the issue that Schemas has, but for consistency I added it there but can remove it as well. It also removes unnecessary api requests. |
Sorry about that didn't mean to re request review didn't see you had requested another review. |
@masonwoodford thank you and sorry for the delay! |
What changes did you make? (Give an overview)
Closes #348
I created a new constant QUERY_REFETCH_ON_WINDOW_FOCUS_OFF_OPTION that just has refetchOnWindowFocus false rather than
export const QUERY_REFETCH_OFF_OPTIONS = {
refetchOnMount: false,
refetchOnWindowFocus: false,
refetchIntervalInBackground: false,
};
I created this new constant because when all 3 options are provided, even when the Edit field is updated the UI will not reflect the changes until the page is refreshed. I added this constant to the two Edit components that fetch and place into editable fields.
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)