A form in the suggest list in Webix (protoUI)

504 Views Asked by At

I'm using Webix and trying to create my own suggest list via protoUI Is it possible to attach the full-featured form (with the text field and the buttons) as a suggest list in Webix? I've already create the UI-part, but I now can't add selected value to the textfield:

webix.protoUI({
  name:"suggest",
  $init:function(obj){
    obj.body = {
      view:"layout",
      rows: [{
        view:"list",
        width:300,
        data:["a-b-c", "d-e-f", "g-h-i"],
        autoheight:true,
        select:true,
      },
      { view: "text" },
      { view: "button", value: "Add", width:100, align:"center" },
            ]
    };
  },
}, webix.ui.suggest);

Here's the snippet of my problem.

1

There are 1 best solutions below

0
AudioBubble On BEST ANSWER

Default popup contains only one sub-view (a list from which you choose the value). You need to redefine getList function, and only then you'll get the values:

getList:function(){
    return this.getBody().getChildViews()[0];
}

Your snippet: http://webix.com/snippet/cfba579c