gets the label of a select control in the lightbox

string getLabel(string property,string| number key);
propertystringthe name of a data property that the control is mapped to
keystring| numberthe option's id. This parameter is compared with the task's data property to
assign the select's option to the task
stringthe label of a select control in the lightbox


    {name:"custom", type:"select", map_to:"unit_id", options:[
        {key:1, label:"James Smith"}, 
        {key:2, label:"John Williams"}]}
const holder2 = gantt.getLabel("unit_id", 2);// ->"John Williams"


The method is applied only to the 'select' controls in the lightbox to get the label of a specific option.

Back to top