Lexically sort torrent and file lists by default
This commit is contained in:
parent
69d428763e
commit
b5d8304651
|
@ -180,7 +180,7 @@ class Torrent extends Component {
|
||||||
<CardBlock>
|
<CardBlock>
|
||||||
<table className="table table-striped" style={{marginBottom: "0"}}>
|
<table className="table table-striped" style={{marginBottom: "0"}}>
|
||||||
<tbody>
|
<tbody>
|
||||||
{files.map(file => <File file={file} />)}
|
{files.slice().sort((a, b) => a.path.localeCompare(b.path)).map(file => <File file={file} />)}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</CardBlock>
|
</CardBlock>
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TorrentTable extends Component {
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{Object.values(torrents).map(t =>
|
{Object.values(torrents).slice().sort((a, b) => a.name.localeCompare(b.name)).map(t =>
|
||||||
<tr
|
<tr
|
||||||
key={t.id}
|
key={t.id}
|
||||||
className={`torrent ${
|
className={`torrent ${
|
||||||
|
|
Loading…
Reference in New Issue
Block a user