diff options
| author | Haishan <[email protected]> | 2019-12-01 22:41:59 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2019-12-01 22:41:59 +0800 |
| commit | 8b5ecb3f1839808d5e88f635d286fcfdfffd4f86 (patch) | |
| tree | fbbaef42b57a1fe3cb244103ccbb58915e631c66 /src/components/ConnectionTable.js | |
| parent | 19ecf435de90800fe284e3333b3a4957d600f410 (diff) | |
feat: support close all connections
for https://github.com/haishanh/yacd/issues/338
Diffstat (limited to 'src/components/ConnectionTable.js')
| -rw-r--r-- | src/components/ConnectionTable.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/ConnectionTable.js b/src/components/ConnectionTable.js index 17293c0..2e7ba7f 100644 --- a/src/components/ConnectionTable.js +++ b/src/components/ConnectionTable.js @@ -34,6 +34,13 @@ function renderCell(cell, now) { } } +const tableState = { + sortBy: [ + // maintain a more stable order + { id: 'start', desc: true } + ] +}; + function Table({ data }) { const now = new Date(); const { @@ -45,7 +52,8 @@ function Table({ data }) { } = useTable( { columns, - data + data, + initialState: tableState }, useSortBy ); |
