Property value saved as string to flow.json instead of number

#1

Hi,
I added an option list to an existing node to enable selecting an existing property.
The value of the property is saved as string (e.g. "address":"72") to the flow.json instead of "address":72.
Actually I copied the tags of another property and renamed the class and the id. The source property works fine and its selected value is saved as number.
Please advise how I can force the property value to be saved as number to the flow.json.
BR,
Janos

0 Likes

#2

Hi @janoslaszlo

Without seeing exactly what you've done, it's hard to know why it isn't working.

What changes did you make to the nodes html file?

0 Likes

#3

Hi @knolleary,

I changed this:

    <div class="form-row">
    <label for="node-config-input-address"><i class="fa fa-user"></i> Address</label>
    <input type="text" id="node-config-input-address" placeholder="0x48">
</div>

to this:

<div class="form-row">
    <label for="node-input-address"><i class="fa fa-address"></i> Address</label>
 	<select id="node-input-address">
        <option value=72 >0x48</option>
        <option value=73 >0x49</option>
    </select>

</div>

in https://github.com/cinqueon/node-red-contrib-ads1x15/blob/master/ads1x15/ads1x15.html

BR,
Janos

0 Likes