-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add support for sorting columns in prep dialog #5214
base: production
Are you sure you want to change the base?
Conversation
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.
👍
specifyweb/frontend/js_src/lib/components/Interactions/PrepDialog.tsx
Outdated
Show resolved
Hide resolved
) | ||
// Change to use an object for selected state allowing null values | ||
const [selected, setSelected] = useLiveState<{ | ||
[key: string]: number | null; |
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.
(optional) instead of null, could you refactor the code you added in this file to use undefined
? that would be more consistent with what we use in the rest of the codebase
return newSelected; | ||
}); | ||
} else { | ||
const count = parseInt(newCount, 10); |
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.
hmm, the Input.Integer
is supposed to call onValueChange
with number
not string
as far as I remember
this this parseInt here and the if (newCount === '') {
check above is not right 🤔
…log.tsx Co-authored-by: Max Patiiuk <[email protected]>
Fixes #5142
This makes it so that the columns in the preparation select dialog are now sortable. This includes only Catalog Number, Taxon, Preparation, Available, and Unavailable. 'Selected' is not sortable at this time.
AI Disclaimer: This PR was drafted with help from GPT-4o mini. This is largely an experiment to see how capable it is.
I'm going to work on this in my free time. If we see this being an urgent priority, please have a staff developer begin work on this!
Checklist
and self-explanatory (or properly documented)
Testing instructions
Please test this side-by-side with the latest
v7
tagged release. If an issue is encountered, please verify that it also does not happen inedge
before requesting changes.Please test this as extensively as possible. Let me know if you have any questions.