OBPIH-6930 added page reload after changing location#5007
OBPIH-6930 added page reload after changing location#5007awalkowiak merged 7 commits intodevelopfrom
Conversation
|
|
||
| window.location.reload(); | ||
| }); | ||
| setIsOpen(false); |
There was a problem hiding this comment.
this is not the solution we would want to have. This way, you would always reload the page, it's not what React's flow is about (SPA).
What you need to do is to refetch the data when the location changes (using appropriate useEffect)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5007 +/- ##
============================================
+ Coverage 7.72% 7.76% +0.03%
- Complexity 854 857 +3
============================================
Files 610 610
Lines 42589 42589
Branches 10346 10346
============================================
+ Hits 3292 3305 +13
+ Misses 38810 38793 -17
- Partials 487 491 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| })); | ||
|
|
||
| const fetchData = () => { | ||
| sourceRef.current = CancelToken.source(); |
There was a problem hiding this comment.
I think this looks good because this is what we also did for the old useTableData. The only request I have is to copy the comment from the useTableData, so that everyone understands why it is needed here.
✨ Description of Change
Link to GitHub issue or Jira ticket:
Description:
📷 Screenshots & Recordings (optional)