fix(admin-ui): Fix inventory table pagination on location filter change (#3479)

Inventory table offset should now correctly reset when a new location is selected from the filtering dropdown.

Resolves CORE-1231.
This commit is contained in:
Rares Stefan
2023-03-15 13:20:30 +01:00
committed by GitHub
parent 3be6084dfd
commit 8e78c533c4
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/admin-ui": patch
---
fix(admin-ui): Fix inventory table pagination on location filter change

View File

@@ -154,6 +154,7 @@ export const useInventoryFilters = (
const setLocationFilter = (loc: string) => {
dispatch({ type: "setLocation", payload: loc })
dispatch({ type: "setOffset", payload: 0 })
}
const paginate = (direction: 1 | -1) => {