-
Notifications
You must be signed in to change notification settings - Fork 9
fix: Trigger request fetch on tab change in invoice dashboard #330
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
Conversation
WalkthroughThis pull request involves two primary changes: updating the version of the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/invoice-dashboard/src/lib/view-requests.svelte (1)
Line range hint
577-579: Optimize duplicategetRequestscalls inloadRequests.The function calls
getRequeststwice: once after enabling/disabling decryption and again at the end of the function. This could lead to unnecessary API calls.Consider removing the duplicate call:
} finally { loading = false; } - await getRequests(currentAccount, currentRequestNetwork); - loading = false;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
packages/invoice-dashboard/package.json(1 hunks)packages/invoice-dashboard/src/lib/view-requests.svelte(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/invoice-dashboard/package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (1)
packages/invoice-dashboard/src/lib/view-requests.svelte (1)
439-441: LGTM! The change fixes the pagination issue.The addition of
getRequestscall in thechangeTabfunction ensures that data is properly refreshed when switching tabs, preventing stale data and pagination issues.
MantisClone
left a comment
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.
Looks good but wasn't this PR supposed to re-fetch on sort as well? It only seems to re-fetch on change tab.
I was planning to invalidate the query which would refetch entirely. When I looked it further I noticed that SDK don't have a sort param and other filtering params to allow it to be properly implemented with current UI. For instance, I can invalidate the query on sorting but SDK will always return in ascendent order. |
Problem
Changes
Fixes #329
Summary by CodeRabbit
Version Update
@requestnetwork/invoice-dashboardpackage version from0.15.0to0.15.1Bug Fixes