Dashboard Ui-Dropdown

I'm trying to create a dropdown with some index values that I get from a previous array.

I first write this function to get the indexes:

let indexes = [];

// Iterate through each item in msg.payload
msg.payload.forEach((item, index) => {
    // Push the index into the indexes array
    indexes.push(index);
});

// Set the indexes for the dropdown
msg.payload = indexes;
return msg;

And then I connect it to the ui-dropdown node. However, the dropdown appears in blank on my dashboard.

Anyone that may know why ?????

Thanks

Try
msg.options = indexes;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.