I’m using the resourcePicker
to select products within my action extension. I’m launching it with a filter query like to limit to products within a specific collection. This works, however the search query does not work when I specify this query? I confirmed that search does work if I don’t also provide a filter query. Seems like they were not designed to work together?
async function selectProduct() {
const numericId = collectionId.split('/').pop(); // Convert global to numeric id
const newProducts = await resourcePicker({
type: 'product',
action: 'select',
multiple: true,
filter: {
variants: false,
// Fetch products that belong to the collection
query: `collection_id:${numericId}`,
},
});
newProducts?.forEach((p) => onSelect(p));
}
This is a snippet of the query generated under the hood with the search term “dad”.