Resource picker in Discount function Admin UI Extension not respecting "multiple" option

I’m trying to use the resource picker for products in “admin.discount-details.function-settings.render” admin target.
But, I’m seeing different behavior when using “filter.variant” option with resource picking for product type and cannot control through the “multiple” options.

With the following, I can select multiple products.

const selection = await resourcePicker({
      type: "product",
      filter: {
        variants: true,
      },
      multiple: true,
    });

However with the following, I can only select one product. And multiple has no effect in both cases.

const selection = await resourcePicker({
      type: "product",
      action: "select",
      filter: {
        variants: false,
      },
      multiple: true,
    });

@Edmond Hi,

const selected = await window.shopify.resourcePicker({
            type: "product",
            action: "select",
            multiple: true,
            filter: {
                variants: false,
            }
        });

I used the above code and was able to select multiple products.

I hope this could be useful to you.

Hi @Narayanan_K,
Thanks for the reply. Unfortunately, the issue is happening in the Admin UI Extension so no access to the window object.
I’m trying to use the api from this doc (below) but it doesn’t seem to work the same as the usual app bridge api: