options

defines data items of the drop-down list

array|string options;

Example

webix.ui({
    view:"multicombo",
    value:1, // the initially selected one
    label: 'Fruit',
    options:[ 
       { "id":1, "value":"Banana"}, 
       { "id":2, "value":"Papaya"}, 
       { "id":3, "value":"Apple"}
    ]
});
 
webix.ui({
    view:"multicombo",
    value:"Apple",
    options:["Banana", "Papaya", "Apple"]
});
 
webix.ui({
    view:"multicombo",
    options:"server/options.php"
});

Related samples

Details

The options of a dropdown list can be set as:

  • an array of strings;
  • an array of objects, each with the id and value properties, where
    • id - (string, number) the item id, which serves as the real value of the option for inner logic;
    • value - (string) the item label, which is the displayed string of the option;
  • a string with a path to the script that loads options from the server.

The initially selected option is defined by a value property.

See also
Back to top