DHTMLX / gantt

GPL version of Javascript Gantt Chart
https://dhtmlx.com/docs/products/dhtmlxGantt/
GNU General Public License v2.0
1.44k stars 320 forks source link

Property 'form_blocks' does not exist on type 'GanttStatic'. #81

Closed septe01 closed 11 months ago

septe01 commented 2 years ago

hello I'm septe.

I have isse when I want to implement multi select input in my project.

Property 'form_blocks' does not exist on type 'GanttStatic'. block

how to fix it. could any one help me please

base project : react typeScript

` gantt.form_blocks['multiselect'] = { render: function(sns) { var height = (sns.height || '23') + 'px'; var html = "

'; return html; },

  set_value: function(node, value, ev, sns) {
    node.style.overflow = 'visible';
    node.parentNode.style.overflow = 'visible';
    node.style.display = 'inline-block';
    var select = $(node.firstChild) as any;

    if (value) {
      value = (value + '').split(',');
      select.val(value);
    } else {
      select.val([]);
    }

    select.chosen();
    if (sns.onchange) {
      select.change(() => {
        sns.onchange.call(this);
      });
    }
    select.trigger('chosen:updated');
    select.trigger('change');
  },

  get_value: function(node, ev) {
    var value = $(node.firstChild).val();
    return value;
  },

  focus: function(node) {
    $(node.firstChild).focus();
  },
};
`
septe01 commented 2 years ago

solved ..

Property 'form_blocks' does not exist on type 'GanttStatic