Tabbar addOption error Cannot read property 'value' of null

edited July 21 in Technical questions

Hi I am getting Cannot read property 'value' of null error with first dynamic add of a new tab using addOption. Problem occurs here (webix.js - setValue) if the oldvalue and newvalue are the same then $getValue() is fired and then getInputNode which returns null, is this a bug or am I doing something wrong?

Note: Same error if you click menu item to add a tab then click the same menu item again. Occurs in this dynamic sample
https://snippet.webix.com/19d35274

$getValue: function () {
    return this._pattern(this.getInputNode().value, false);
  },

  getInputNode: function () {
    return null;
  },



setValue: function (value) {
    value = this.$prepareValue(value);
    var oldvalue = this._settings.value;

    if (this.$compareValue(oldvalue, value)) {
      if (this._rendered_input && value != this.$getValue()) 
this.$setValue(value);
      return false;
    }

    this._settings.value = value;
    if (this._rendered_input) this.$setValue(value);
    this.callEvent("onChange", [value, oldvalue]);
  },

Comments

  • edited July 22

    Hey @Tomk, we've indeed had some issues with tabbar and segmented views in 6.4.1, they have been fixed as of 6.4.2, you can try clearing cache and running your example in the snippet again to see the fix in action (you can ensure your version is correct by checking out the webix.version - https://snippet.webix.com/5vzm96s6).

  • Thanks updated from 6.4.1 to 6.4.2 and that has fixed that issue

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion