Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listTable errors out when setting a label in config #378

Closed
chris-kruining opened this issue May 13, 2019 · 1 comment
Closed

listTable errors out when setting a label in config #378

chris-kruining opened this issue May 13, 2019 · 1 comment

Comments

@chris-kruining
Copy link

const list = grid.set(0, 8, 4, 4, blessed.ListTable, {
        label: ' Queue ',
        keys: true,
        border: {
            type: 'line'
        },
        style: JSON.parse(JSON.stringify(style)),
        rows: items,
    });

gives the following error ::

[18:00:12]     Cannot read property 'length' of undefined

   728|   // TODO: Could possibly drop .dirty and just clear the `lines` buffer every
   729|   // time before a screen.render. This way clearRegion doesn't have to be
   730|   // called in arbitrary places for the sake of clearing a spot where an
   731|   // element used to be (e.g. when an element moves or is hidden). There could
   732|   // be some overhead though.
   733|   // this.screen.clearRegion(0, this.cols, 0, this.rows);
   734|   this._ci = 0;
   735|   this.children.forEach(function(el) {
   736|     el.index = self._ci++;
   737|     //el._rendering = true;
-> 738|     el.render();
               ^
   739|     //el._rendering = false;
   740|   });
   741|   this._ci = -1;
   742|
   743|   if (this.screen.dockBorders) {
   744|     this._dockBorders();
   745|   }
   746|
   747|   this.draw(0, this.lines.length - 1);

at Box.Element._getShrinkContent (/var/www/framework/compiler/node_modules/blessed/lib/widgets/element.js:1605:24)

(code preview doesn't seem to match with the file and line)

calling listTable.setLabel('some label') does seem to be a working workaround

@chris-kruining
Copy link
Author

closing as this project is dead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant