List component does not have a getValue() method

Dear all,

I’d like to be able to fetch selected ids of a list component in a form, having select:true attribute.

But list component don’t have a getValue() method.

https://snippet.webix.com/c3dd5wbl

Any suggestions (just looking for a quick workaround) ?

How can i add something in the list (extend it using a protoUI ?) so i can use form.getValues() ?

Thank you !

Exceptionally (little hurry here) , let me ping you @MariyaDemy @intregal just to know if you have any suggestions, thank you !

dirty workaround

webix.extend(webix.ui.list.$protoWait?webix.ui.list:webix.ui.list.prototype, {
  $allowsClear: true,
  getValue: function(){
    return this.getSelectedId(true);
  },
  setValue: function(value){
    this.select(value);
  }
})

https://snippet.webix.com/pz5pldri

1 Like

Big thanks @intregal, i would never have found it on my own, i tried something like that but without this crazy extend !

:heart_eyes: