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

fix: disable transaction type filter when there are no transactions #818

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

shahin-hq
Copy link
Contributor

@shahin-hq shahin-hq commented Nov 14, 2024

Summary

Closes: https://app.clickup.com/t/86dv5gmyt

Checklist

  • My changes look good in both light AND dark mode
  • The change is not hardcoded to a single network, but has multi-asset in mind
  • I checked my changes for obvious issues, debug statements and commented code
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arkvault ✅ Ready (Inspect) Visit Preview Nov 15, 2024 10:40am

@shahin-hq shahin-hq changed the title fix: hide transaction type filter when there are no transactions fix: disable transaction type filter when there are no transactions Nov 14, 2024
@@ -148,6 +149,14 @@ export const Transactions = memo(function Transactions({
return !hasEmptyResults || hasFilter || hasMore;
}, [activeMode, hasEmptyResults, activeTransactionType, isLoadingTransactions, hasMore]);

const enableFilter = useMemo(() => {
if (isLoadingTransactions || hasFilter) {
Copy link
Contributor Author

@shahin-hq shahin-hq Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to enable filter when transactions are loading or when a filter is applied - I mean by that is initially we have all possible options selected this should be understood as no filters applied, when user picks a filter it means there was at least one transaction to display, so we shouldn't disable the filter.

@ItsANameToo ItsANameToo merged commit 508ddd3 into develop Nov 15, 2024
20 checks passed
@ItsANameToo ItsANameToo deleted the fix/make-txs-table-smoother branch November 15, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants