Dropdown Not Displayed in UI Dashboard, Only in Node-RED Editor

I’m creating a custom Node-RED node that includes a Vue.js-based dropdown using v-autocomplete. The goal is to display this dropdown in the Node-RED UI Dashboard. However, the dropdown appears only in the Node-RED editor and not in the actual dashboard.

Here’s a summary of my setup:

  1. The node’s HTML contains a <template> block for rendering the dropdown.
  2. The Vue.js script dynamically populates the dropdown options based on incoming messages (msg.payload).
  3. The Vue component renders correctly in the editor, but the dropdown is not visible in the dashboard.
<template>
  <div>
    <div class="msg">
      <v-form>
        <v-autocomplete
          :items="topologies.map(topology => topology.name)"
          label="Select Topology"
          placeholder="Search for the topologies"
          clearable
          chips
          variant="underlined"
          closable-chips
          v-model="selectedTopology">
        </v-autocomplete>
      </v-form>
      <div id="topology-container"></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      topologies: [],
      selectedTopology: null,
    };
  },
  mounted() {
    this.$watch('msg.payload', (newPayload) => {
      if (Array.isArray(newPayload)) {
        this.topologies = newPayload;
      }
    });
  },
};
</script>

<style>
#topology-container {
  width: 100%;
  height: 100%;
}
</style>

  • How can I ensure the dropdown renders in the UI Dashboard rather than in the Node-RED editor?
  • Are there any specific considerations for embedding Vue.js components in the dashboard?
  • Do I need to modify the <template> block or use a different approach to integrate with the dashboard?

When you say it's rendering in the Node-RED Editor, can you screenshot this please?

I recommend forking GitHub - FlowFuse/node-red-dashboard-2-ui-example: An example project for writing third-party nodes that integrate with Node-RED Dashboard 2.0 in order to build your custom node as that already contains all of the templated code and folder structure you would need.

You can also read more about this in our documentation here

1 Like


but i need to bring that dropdown functionality through the dashboard ui. i created a new custom node red

For any pieces in the Node-RED Editor, you need to use jQuery or plain HTML/JS. The Vue components only work in the Dashboard itself, which you define in the .vue files (see the documentation and example I linked previously which covers this in more detail)