Populate dynamic dropdowns
In order to populate dropdowns during setup, the Dev Dashboard will ask for a URL where it can fetch an array of options. These options are arrays of objects with a label
and value
. The label will be what is displayed, while the value will be saved in the installation config.
![Screen Shot 2021-05-22 at 11.47.36 PM.png 1276](https://files.readme.io/88676d2-Screen_Shot_2021-05-22_at_11.47.36_PM.png)
Here's an example of the options array
app.post('/options', (req, res) => {
res.send([
{ label: 'Foo', value: 1 },
{ label: 'Bar', value: 2 },
]);
});
Updated almost 2 years ago