Hey,
When a user inputs using a slider, I want to auto save to the collection without a button.
The code I’m using (below) does this, however it saves at the first point the slider reaches instead of where it finishes. Eg The slider has two steps 0 - 50 - 100, when sliding to 100 it will stop at 50 and save, then the user needs to go back and slide again from 50 - 100. (hope that makes sense).
It’s almost as if I need to user an afterChange event instead of an onChange or add a delay into the code … any ideas folks?
export function slider21_change(event) {
$w( ‘#dataset3’ ).setFieldValue( “boil” ,$w( ‘#slider21’ ).value);
$w( ‘#dataset3’ ).save()
.then((item) => {
console.log( “data was saved.” )
;
})
. catch ((err) => {
let errMsg = err;
});
}