Skip to content

Commit

Permalink
fix: πŸ› set content of empty cell to empty string for sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
prssanna committed Feb 29, 2020
1 parent 3475f6c commit 18964c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/datamanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,11 @@ export default class DataManager {
this.rowViewOrder.sort((a, b) => {
const aIndex = a;
const bIndex = b;
const aContent = this.getCell(colIndex, a).content;
const bContent = this.getCell(colIndex, b).content;

let aContent = this.getCell(colIndex, a).content;
let bContent = this.getCell(colIndex, b).content;
aContent = aContent == null ? '' : aContent;
bContent = bContent == null ? '' : bContent;

if (sortOrder === 'none') {
return aIndex - bIndex;
Expand Down

0 comments on commit 18964c0

Please sign in to comment.