I’m using the useProductSearch hook to search for products and apply a price range filter, but the price filter doesn’t seem to work at all. It keeps returning products outside the specified price range.
Here’s my code:
const { products, loading, error, fetchMore } = useProductSearch({
query: "shirt",
first: 50,
filters: {
price: {
min: 50,
max: 200,
},
},
});
Here’s output:
**
Issue**
Even though I’m applying a price filter between $50 – $200, the response still includes products priced below that range.
Questions
Why is the price filter not working with useProductSearch?
Is there another recommended way to filter products by price using the Storefront API or Hooks?
If anyone has solved this or knows the correct way to apply price filters, I would really appreciate the help!
