paisable icon indicating copy to clipboard operation
paisable copied to clipboard

bug: 'Export to CSV' button is enabled even when there are 0 transactions

Open mahiptiwari1000 opened this issue 1 year ago • 4 comments

Export to CSV button is enabled even when there are 0 transactions

Expected Behavior

When there are no transactions in the table/list, the "Export to CSV" button should be disabled and not clickable.

Current Behavior

The "Export to CSV" button is currently enabled and clickable even when there are 0 transactions.
Users can click it, which either:

  • does nothing, or
  • downloads an empty CSV.

This is confusing because it implies there is exportable data when there is not.

Possible Solution

Add a conditional check on render:

  • If transactions.length === 0, render the button in a disabled state (e.g. disabled={true} / aria-disabled="true" and remove onClick).
  • If transactions.length > 0, render the normal interactive button.

Also ensure styling reflects disabled (grayed out, no hover).

Steps to Reproduce

  1. Go to the Transactions page (or any screen that lists transactions and includes the "Export to CSV" button).
  2. Filter or load a state where there are 0 transactions returned.
  3. Observe the "Export to CSV" button.
  4. Click the button.
  5. Notice that the button was clickable even though there are no rows to export.

Context (Environment)

This affects usability and clarity.
Users think something went wrong when they click "Export to CSV" and either get an empty file or no response.
We want to avoid support tickets / confusion when no data is available.

This is mostly a UI-state issue, not a backend issue.

Image

mahiptiwari1000 avatar Oct 25 '25 07:10 mahiptiwari1000

I would to like to work on this issue assign it to me

Sahilagarwal623 avatar Oct 25 '25 09:10 Sahilagarwal623

i have created a pr pls review it

Sahilagarwal623 avatar Oct 25 '25 10:10 Sahilagarwal623

@archa8 can you please assign this issue to me? Thanks!

mahiptiwari1000 avatar Oct 26 '25 01:10 mahiptiwari1000

@mahiptiwari1000, assigned to you

@Sahilagarwal623 You were not assigned this issue, so I cannot merge your PR. Kindly don't open PRs without getting any issue assigned to you.

archa8 avatar Oct 31 '25 14:10 archa8