Skip to content

Fix: price column sorting in offers table#2455

Open
kanishka0411 wants to merge 1 commit into
RoboSats:mainfrom
kanishka0411:fix/price-column-sorting
Open

Fix: price column sorting in offers table#2455
kanishka0411 wants to merge 1 commit into
RoboSats:mainfrom
kanishka0411:fix/price-column-sorting

Conversation

@kanishka0411
Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #2454

This PR introduces/refactors/...
Fixes price column sorting in the offers table. The displayed price was calculated on the fly but sorting used the raw field which was always null, so added a sort comparator that uses the actual calculated price.

Screen.Recording.2026-03-22.at.8.15.30.PM.mov

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

Copy link
Copy Markdown

@juanfradb juanfradb left a comment

Choose a reason for hiding this comment

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

utACK bd0e1e3\n\nReviewed the one-file diff. The comparator now derives the sortable value from the same calculated price path used for rendering, instead of the raw field that is absent/null in row data.\n\nValidation run locally:\n- npx eslint src/components/BookTable/index.tsx\n- npm run build\n\nBuild completed with existing bundle-size warnings only. I did not run an end-to-end browser repro.

@juanfradb
Copy link
Copy Markdown

Small correction to my review text above: the missing raw field name is price.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: toggle for sorting by price doesn't work

2 participants