AllenFang / AllenFang/react-bootstrap-table
Sorting of undefined properties causes undefined result
オープン
enhancement
in progress
- 主要言語
- JavaScript
- スター
- 2.2k
- フォーク
- 761
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In my data, some records are missing a property that I display in a sortable column.
I assume this results in the value used for comparisons being `undefined` which messes up sorting. Strangely enough, Chrome still sorts as unexpected but Firefox messes up.
I already did some browsing and found that `null` is handled specially but not `undefined`
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/store/TableDataStore.js#L565
I guess its because the comparison operators `<` and `>` cause unexpected results in combination with `undefined` operands, e.g.:
```javascript
"a" < undefined
false
undefined < "a"
false
```
コントリビューションガイド
評価
この issue はまだ評価されていません。