Hi there,
The ion-input event of ion-range does not fire. Why? Is it a bug or am I missing something?
<ion-range @ion-input="() => { console.log('some'); }"></ion-range>
Btw:
@ion-change get’s fired, but not @ion-input …
I was planing a two-way-binding to :value, but it’s only one-way at initializing state, so I thought to use the @ion-input event …
I am using @ionic /vue": “^7.0.10” …
Maybee someone could confirm that the event gets fired or not …
Hi there,
sorry, but …
Maybee someone could just try the ion-range component and tell me, if her or his ion-input event does fire or not, with his or her package used. I’m using the ionic/vue": “^7.0.10” package.
Thank you, if someone got the time for this easy question.
Greets
I am also suffering from this issue.
Yup, this appears to be a bug. There is an open issue here - bug: ionInput event in Ion-Range component doesn't trigger · Issue #27292 · ionic-team/ionic-framework · GitHub
There is some insight into the issue in the closed PR that didn’t get merged due to affecting IonChange
- fix(vue): range emits ionInput by liamdebeasi · Pull Request #27294 · ionic-team/ionic-framework · GitHub
I just upgraded to Ionic 7 and missed in my testing that this isn’t working
I created a reproduction here .
1 Like
Here is an update from Liam. The Ionic team is actively working on a solution.
The root issue is caused by Ionic not having a way of synchronously updating the v-model
ref. This results in a (hacky) workaround that has limitations. We’re trying to get a feature added to Vue that would make this easier to implement (see: vuejs/core#8652 ) but we are also looking at alternative implementation patterns in the meantime.
opened 08:39PM - 26 Apr 23 UTC
package: vue
type: bug
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://git… hub.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
v7.x
### Current Behavior
When I have`ionInput` event in `<ion-range>`. The `ionInput` event isn't triggered.
### Expected Behavior
I expect `ionInput ` event to be triggered and to be fired continuously while I'm dragging the knob on `ion-range`.
### Steps to Reproduce
1. Use that line of code `<ion-range @ionInput="onIonInput"></ion-range>`
2. Drag the knob
3. Event won't be triggered and `onIonInput()` won't be called.
### Code Reproduction URL
https://stackblitz.com/edit/angular-ivdjbp?file=src/components/Example.vue
### Ionic Info
Ionic:
Ionic CLI : 6.20.8 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 7.0.4
Capacitor:
Capacitor CLI : 4.7.3
@capacitor/android : 4.8.0
@capacitor/core : 4.7.3
@capacitor/ios : 4.8.0
Utility:
cordova-res : not installed globally
native-run : 1.7.2
System:
NodeJS : v14.17.2 (/usr/local/bin/node)
npm : 6.14.13
OS : macOS Monterey
### Additional Information
_No response_