Skip to content

Commit

Permalink
Fix table scrolling, add select event.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Sep 20, 2017
1 parent eab243f commit 0f91a13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/widgets/listtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ ListTable.prototype.select = function(i) {
if (i <= this.childBase) {
this.setScroll(this.childBase - 1);
}
return this._select(i);
this._select(i);
// Correct scrolling for header offset.
this.scrollTo(this.selected - 1);
if (this.rows && this.selected) {
this.emit('selectrow', this.rows[this.selected], this.selected)
}
};

ListTable.prototype.render = function() {
Expand Down

0 comments on commit 0f91a13

Please sign in to comment.