Skip to main content

value

Optional. Specifies the values that will appear in the input on initialization of the combobox by their id(s)

value?: string | number | (string | number)[];

Example

const combobox = new dhx.Combobox("combo_container", {
multiselection: true,
value: ["austria", "estonia"]
});

// or
const combobox = new dhx.Combobox("combo_container", {
value: "austria"
});

Related sample: Combobox. Initial value

  • If multiselection:true is set for a combo, the property takes an array of options' ids as:
    value: ["1","2","3"];
  • If multiselection:false is set or the multiselection config is not defined, the property gets either of the two values: value:"1" or value: ["1"].

Change log:

added in v7.0