You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set the value on this range component to be -1, ionChange fires and the component's value is set to be -1.
Expected behavior:
I would expect this to behave similar to the native range component. If a value is out of range, set it to either the min or the max (whichever value is closer).
Steps to reproduce:
Related code:
<ion-range min="0" max="10" value="5" id="range"></ion-range>
<ion-button onclick="changeValue()">change value</ion-button>
<script>
let range = document.getElementById('range');
range.addEventListener('ionChange', (e) => {
console.log('change',e.detail);
});
function changeValue() {
range.value = -1;
}
</script>
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 4.x
Current behavior:
<ion-range min="0" max="10" value="5"></ion-range>
If I set the value on this range component to be
-1
,ionChange
fires and the component's value is set to be -1.Expected behavior:
I would expect this to behave similar to the native range component. If a value is out of range, set it to either the min or the max (whichever value is closer).
Steps to reproduce:
Related code:
Other information:
Ionic info:
The text was updated successfully, but these errors were encountered: