Cannot find a way to add set of values to a Select option (dropdown)

Hey @anoopshankaran!

Assuming each select has a different set of options, the most flexible thing I'm thinking of to accomplish this is to pass a full set of configurations for each select component in a single query:

const colors = { label: "Colors", options: ["Purple", "Orange", "Red"] };
const selectedColor = select1[0].value;

const shapes = {
  label: "Shapes",
  options: {
    Purple: ["Square", "Circle"],
    Orange: ["Circle", "Triangle"],
    Red: ["Square", "Triangle"],
  }[selectedColor],
};

return [colors, shapes];

You can then get those configurations using i:

With that you get:

It sounds like you may have already considered this option, does it seem like it could work?

4 Likes