Picker onClose / onClosed events?

Hi,

I need to know when the picker is closed, by the user clicking on the close button or clicking outside of the picker.
Quite a lot of actions are taken when the user selects a new picker value and I want to wait till the choice is final before performing the actions.
I wanted to wait till the picker closes.

But the documented picker events close and closed are never fired (bug ?).
Is there a workaround ?

Here is the picker:

var mix_picker = app.picker.create({
inputEl: ‘#mix-picker’,
value: [mixIds[0]],
toolbarCloseText: ‘OK’,
formatValue: function (values, displayValues) {
return displayValues[0];
},
cols: [
{
textAlign: ‘center’,
displayValues: mixNames,
values: mixIds,
onChange: function (picker, value) {
mix_apply(value);
},
onClosed: function (picker) {
console.log(‘mix picker onClosed’);
},
onClose: function (picker) {
console.log(‘mix picker onClose’);
}
},
]
});

Many thanks !

Olivier

Look at documentation http://framework7.io/docs/picker.html You are adding events in a wrong way

app.picker.create({
  ...
  on: {
    close() {
      // do something
    }
  }
})

Thanks, it’s solved. Great tool, great support !