Cannot read property 'offsetHeight' of null

Posted by: tmurugasamy on 10 May 2019, 4:19 am EST

  • Posted 10 May 2019, 4:19 am EST

    I am getting below when click the wijmo grid cell

    TypeError: Cannot read property ‘offsetHeight’ of null

    at t.e.refresh (wijmo.input.js:14)

    at t.e.refresh (wijmo.input.js:14)

    at t.e.refresh (wijmo.input.js:14)

    at t.refresh (wijmo.angular2.input.js:14)

    at wijmo.js:14

    at ZoneDelegate.invokeTask (zone.js:423)

    at Object.onInvokeTask (core.js:17290)

    at ZoneDelegate.invokeTask (zone.js:422)

    at Zone.runTask (zone.js:195)

    at ZoneTask.invokeTask (zone.js:498)

  • Posted 12 May 2019, 6:24 pm EST

    We are sorry but we were not able to replicate the issue at our end. Could you please refer to the sample provided and let us know if we have missed something?

    https://stackblitz.com/edit/angular-dzjgfr

    Feel free to modify the sample so that it replicates the issue.

    Also, by looking at the error produced, we think that you are using an Input control as a custom editor for the grid. Could you please provide us with a sample which we can use to investigate further?

  • Posted 1 March 2024, 3:14 am EST

    Hello.

    We’re getting the same error caught by Sentry. I believe it happens when user clicks on “Select All” checkbox under the column’s filter search input.

    “wijmo”: “5.20221.857”

    TypeError: Cannot read properties of null (reading ‘offsetHeight’)

    handled: true

    function: setTimeout**

    Call stack

    **Frame 1: **

    …/node_modules/wijmo/wijmo.grid.filter.js in ValueFilterEditor.prototype._adjustWidths at line 1180:1

    wijmo_1.setChecked(this._cbSelectAll, t && i ? null : t > 0);
        this.canApply = t > 0;
      };
      ValueFilterEditor.prototype._adjustWidths = function () {
        var e = this._lbValues.hostElement;
        if (e.offsetHeight > 0) {
          var t = 0,
            i = e.querySelectorAll(".wj-listbox-item label");
          if (i.length) {
            for (var r = 0; r < i.length; r++) t = Math.max(t, i[r].scrollWidth);
            if (t) {

    Frame 2:

    …/node_modules/wijmo/wijmo.grid.filter.js in apply at line 1167:1

    ValueFilterEditor.prototype._cbSelectAllClicked = function () {
        for (var e = this, t = this._cbSelectAll.checked, i = this._divValues.scrollTop, r = this._getItems(), n = 0; n < r.length; n++) r[n].show = t;
        this._view.refresh();
        this._divValues.scrollTop = i;
        setTimeout(function () {
          e._adjustWidths();
        }, 0);
      };
      ValueFilterEditor.prototype._updateSelectAllCheck = function () {
        for (var e = this._getItems(), t = 0, i = 0, r = 0; r < e.length; r++) {
          e[r].show ? t++ : i++;
  • Posted 3 March 2024, 11:21 pm EST

    Hi,

    Sorry, but we are still unable to replicate the issue on our end. Could you please modify the below sample to replicate the issue and share it with us, so that we can further investigate the issue and assist you accordingly?

    Sample link - https://stackblitz.com/edit/js-cpmzv6?file=index.js

    In case, if there is something we missed, please let us know.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels