Drop down list box showing junk at the end of the default value

I am attempting to show a default value in a Drop down list box.
The drop down looks like this:
C1

Quite simple.
Click the Scan button and then I get this: This is the default value passed in msg.payload.
C7JPG
Notice the comma and the junk on the end. What isn't shown here is that the mouse is still over the button i.e the button still has the focus.

If I move the mouse away from the button so it loses focus, the dropdown then redisplays correctly like this without me having top do anything.
C8

I have found that if I click the button and immediately move the button away before the MQTT task has completed and returned a response (2-3 seconds), the junk still appears and it will only 'disappear' if I move the focus back over the button then move it away again.

A debug at the time shows the msg - both options and payload to be correct - at least they look good to me!
C9

Does anybody spot something I have missed - or is this a NR bug? (heaven forbid).
@dceejay

Can you provide your flow?

Not easily as it relies on an MQTT incoming message. I was hoping if anybody sees something amiss from the 2 fields msg.options and msg.payload that are pushed into the dropdown listbox.
They are the only 2 fields that can influence the dropdown.
I can try to see if I can create a cut down flow that replicates the problem.

However , the fact that shifting focus from the button causes the dropdown to automatically redsplay correctly seems very suspicious.

Put a debug node (set to display the Complete msg object) on the output of the mqtt-in node and that will provide data that could be used in an inject or change node to pass the data into the flow for testing.

But without seeing what the flow looks like and the settings you have makes things difficult to suggest or recreate what might be happening.

Also, what version of NR, node.js and the dashboard (see startup log) are you running?

Not that easy as the button is definitely playing part here.
I have the button fire off a MQTT outbound message.
I get a MQTT inbound a few seconds later and the returned data is used as input to the Dropdown. I use the first entry as the msg.payload to create the default display value.
The button has the focus . as soon as I move the focus away from the button the dropdown redisplays automatically - correctly.
If the focus was already moved during those intervening few seconds, I have to hover back over the button then move it away again to get the dropdown to automatically redisplay correctly.

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