We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Disable products in Resource Picker to prevent selection?

Disable products in Resource Picker to prevent selection?

andrewnestscale
Shopify Partner
1 0 0

Hi everyone,

I’m using the the Resource Picker from Shopify App Bridge to allow users to select products in my app. Here’s a snippet of my current implementation:

const selected = await shopify.resourcePicker({
    type: 'product',
    filter: {
        variants: false, // Example: filtering products without variants
    },
});

What I want to achieve is to disable certain products in the Resource Picker, so users cannot select them. For example, I want to prevent the selection of products in list of my product ids.

My questions are:

  1. Is there a way to disable some products in the Resource Picker?
  2. If disabling isn’t supported directly, is there any workaround or alternative approach to accomplish this?

Thanks in advance!

Replies 0 (0)