I will start by saying what you’re asking to do is technically possible. However, I want to caution you that 1) it is extremely tedious and time consuming to do this and 2) you have to set up your component with the maximum number of drop-downs you will need at the beginning.
The only way I was able to create the scenario you’re describing is by creating a master component that included every possible state for every drop-down list and selection combination.
I started by creating a drop-down, then creating a product line item, and then finally creating a product table that contained 3 products. I then created duplicates of that frame where each product could have the drop down set to an array between 1-3. But because there are 3 products with 3 selections, this maths out to be 3x3x3=27 possibilities.
Then I created a variation where each of those combinations could have the drop-down menu open or closed, which means that there’s 4 additional states a menu could be in: closed, open with 1 selected, open with 2 selected, and open with 3 selected. So 27x4=108 total versions of this single product table where there were 3 products that could have a quantity between 1-3.
At this point, I painstakingly renamed all my frames so it followed the naming conventions to support multiple properties. The naming convention I used was Product Table / Product A # / Product B # / Product C # / State. Where there is a #, this could be 1-3. And State could be Closed, 1 Selected, 2 Selected, or 3 Selected (this supports the opening of the drop-down list, otherwise you’re just changing the # inside the closed drop-down list…see above paragraph). I selected all 108 versions, and converted it to a component set. If you convert it all into a component before renaming your frames, you’ll have many regrets. Don’t skip.
AND THEN you have to tediously add each of the interactions.
For a version of the product table where all of the drop-downs are closed (of which there are 27 versions), you have to create an interaction for “On Click” > Change To > (the open version of whatever state you’re currently using). This part was pretty fast, even for 27 of them. You’ll have to do this X times, where X is equal to your total number of products in your product table.
For a version of the product table where a drop-down menu is open (of which there are 81 versions), you’ll have to add an interaction on the currently selected number to go back to the closed state (otherwise, there’s no way to close the drop-down without making a new selection). You’ll also have to add an interaction for each possible numerical selection. Because my drop-down only supported a quantity between 1-3, that means a total of 4 interactions each time. I should remind you that you have to select that specific line item each time, then set the parameters exactly for that selection.
This is where I gave up. It’s extremely tedious and time consuming, which is why I don’t have an example to share. If I was to do this again, I would create a product table with 2 products that could have a quantity between 1-2 (12 variations vs. 108). Oops.
So, quick math. For my prototype, I would have needed to make this many interactions:
405 interactions to build a product table with 3 products that could have a quantity between 1-3!! I shudder to think how upping the quantity to 5 like in your example would affect the numbers. I hate math, so I’ll let someone else do the number crunching.
Needless to say, it’s an extremely time-consuming task, and I absolutely would not recommend building this out unless the client/stakeholder absolutely insists on it. And even then, I would emphasize the amount of effort such a requirement would have on your build time and suggest ways to accomplish the goal of the prototype without implementing this solution.
If you’re trying to build your prototype to conduct usability testing, I highly recommend you simply phrase your test question to push a user to change the quantity for a single item. For example, “Please show what you would do if you wanted to purchase two [products].” You don’t need to provide test participants with every possible action in order to determine viability of a product or feature.
Hope this helps!
Edit: Had to adjust my formulas to use x rather than an asterisk to represent multiplication because it was adding italics styling.