-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
product list and inventory list default order #14911
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,9 +10,10 @@ const productsListQuery = () => ({ | |
| limit: 20, | ||
| offset: 0, | ||
| is_giftcard: false, | ||
| order: "-created_at", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Loader query key mismatches component query key causing flickerMedium Severity The loader now pre-fetches with |
||
| }), | ||
| queryFn: async () => | ||
| sdk.admin.product.list({ limit: 20, offset: 0, is_giftcard: false }), | ||
| sdk.admin.product.list({ limit: 20, offset: 0, order: "-created_at", is_giftcard: false }), | ||
| }) | ||
|
|
||
| export const productsLoader = (client: QueryClient) => { | ||
|
|
||


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.
Order parameter added to detail query instead of list
Medium Severity
The
order: "-created_at"parameter is added toinventoryDetailQuery, which callssdk.admin.inventoryItem.retrieve(id, ...)— a single-item retrieval endpoint. Ordering is meaningless when fetching one item by ID. The PR intends to change the default sort order of the inventory list, but the inventory list table (ininventory-list-table.tsx) is untouched. This change has no user-visible effect and the actual intended inventory list ordering fix is missing.