Dropdown not clearing when passing empty array

For some reason it's not working. It'll clear whatever value is present in the dropdown but the rest of the msg.options are still there when you click back on the dropdown.

The instructions also say to pass a Boolean true payload under msg.resetSearch which doesn't do anything.

Dang it. I figured it out. Sending an empty array to msg.payload clears the bar and sending an empty array to the same dropdown as msg.options clears the list of items sent in that options payload.

Is there a way to trigger the dropdown from a message instead of user clicking on it ?

What do you mean by triggering it?

If you mean that you want to select an entry and act as if the user had clicked that entry then, as described in the help text, if you pass in msg.payload with the value it will select it, and if you have message passthrough enabled in the node then that will also be passed to the next node.

By triggering I meant to activate the dropdown menu as though the user has clicked to select an option. I am aware I can set a default value to show by sending value in msg.payload, but all I need is to grab attention of the user that when ready, the user now can select an option from the dropdown. Due to my layout, the position of the dropdown is not very revealing, and an automatic dropdown would grab the attention of the user. or a pulsing of the widget or something, I now use msg.enabled =true and =false two times, to get that affect, but i thought a literal dropdown without the user clicking gives a more prominent attention seek. a background color change also would give me what I want and am looking into it now..

For dropdown add class blinkable

A bit of CSS (for all pages)

.blinkable.blink{
    animation: blink 0.5s infinite;
}
@keyframes blink {
    50% {
        filter: brightness(0.4);
    }
}

or if the background color works better

.blinkable.blink{
    animation: blink 0.5s infinite;
}
@keyframes blink {
    50% {
        background: rebeccapurple;
    }
}

And then send message to the dropdown with
msg.class = "blink" to animate it and msg.class = "" to put it back steady.

1 Like

thanks but, sorry, will this work for old dashboard dropdown ?

Probably not directly but can't even test anymore. Uninstalled from all of my instances...

i just checked... msg.className is working!

if someone is interested, the suggestion by @hotNipi works in older dashboard also if you just change the msg.class to msg.className
It is in the docs.

image

flash