Cannot bind a negative value to a range slider

I have a couple of range slider input fields and everything works 100% except when I have a negative value I bind to the field.

The value resets to 0 on the display if the bound value is less than 0.

Is this something you can fix/add to Wappler front end framework or is it a limitation for range slider fields?

Positive result displays:

I can slide it to a negative value if min is set to less than 0:

But if query refreshes it defaults back to 0:

ROI value is returned from db as -4:

Screenshot 2022-11-11 at 11.59.43

bump

Can you please post your range input code?

<input type="range" class="form-range" id="ROI" name="ROI" dmx-bind:min="-6" dmx-bind:max="6" dmx-bind:value="(serverconnectUserDetails.data.queryPrimaryScenario.roiAdjustment*100)" dmx-on:changed.debounce:600="formROI.submit()" dmx-bind:disabled="state.executing">
1 Like

Is there a reason why you are using dynamic attributes with static values?

dmx-bind:min="-6" dmx-bind:max="6"

and not just

min="-6" max="6"

I had it as static. Changed it to see if it makes a difference to the dynamic value working, but result was same as static.

Just change these attributes to static. I just tested and it appears to work fine.

Thanks! Seems I changed multiple items again and lost track of what broke and what “fixed” things.

Appreciate the help!