Skip to content

Commit

Permalink
Merge pull request #69 from rluvaton/fix/redraw-table-on-resize
Browse files Browse the repository at this point in the history
fix: on terminal resize it will redraw the table completely
  • Loading branch information
rluvaton authored Jun 26, 2022
2 parents ecb1fbf + edac6c9 commit d8c27a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ const run = (targets, {columnsToDisplay} = {columnsToDisplay: columnsSorted.map(

tablePrint.print();

// Redraw table on terminal resize
process.on("SIGWINCH", () => {
tablePrint.print();
});

const pingTarget = targets.map(({ip}) => new Ping(ip));

pingTarget.forEach((target, index) => startListen(index, target, columnsObj, tablePrint));
Expand Down

0 comments on commit d8c27a5

Please sign in to comment.