OBPIH-7570 Show spinner only in parent function during cycle count refresh#5613
OBPIH-7570 Show spinner only in parent function during cycle count refresh#5613alannadolny merged 1 commit intorelease/0.9.6from
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/0.9.6 #5613 +/- ##
===============================================
Coverage ? 8.49%
Complexity ? 1119
===============================================
Files ? 712
Lines ? 45618
Branches ? 10914
===============================================
Hits ? 3873
Misses ? 41168
Partials ? 577 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }; | ||
|
|
||
| const refetchData = async (ids = cycleCountIds) => { | ||
| const refetchData = async ({ ids = cycleCountIds, showSpinner = true } = {}) => { |
There was a problem hiding this comment.
Are you sure you've changed all of the function calls?
There was a problem hiding this comment.
Is there a case when we won't show the spinner while refetching?
There was a problem hiding this comment.
Is there a case when we won't show the spinner while refetching?
Yes, we don’t want to show the spinner when we click the “Refresh” button, because we want to display the spinner in the parent function refreshCountItems. We need to do it this way because refreshCountItems calls the save and refetchData functions, which normally show the spinner themselves. In this case, I removed the spinner from those functions, and now the parent function shows it instead.
8c77efd to
f7a759d
Compare
✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7570
Description:
📷 Screenshots & Recordings (optional)