Skip to main content


adds a new item into the list of Combobox options

addOption(value: string, join?: boolean): void;


  • value: string - required, the value of a new item
  • join: boolean - optional, if true (by default), adds the new item to the list of options selected in Combobox; if false, only the new item will be selected in Combobox


const combobox = new dhx.Combobox("combo_container", {
multiselection: true

console.log(combobox.getValue()); // -> u1664261657492,u1664261657494

combobox.addOption("Georgia", false);
console.log(combobox.getValue()); // -> u1664261657520

// check that the new item is added into the data collection

The method invokes the beforeAdd and afterAdd events of the Data Collection object. If the beforeAdd event returns false, a new item won't be added into the data collection.

Change log:

  • The join parameter was added in v8.0
  • The method was added in v.7.3