Sort with numeric compare on files
This commit is contained in:
parent
1dc0775625
commit
585d465952
|
@ -279,7 +279,7 @@ class Torrent extends Component {
|
||||||
<div className="files flex-table" style={{marginBottom: "0"}}>
|
<div className="files flex-table" style={{marginBottom: "0"}}>
|
||||||
{this.state.filesShown
|
{this.state.filesShown
|
||||||
? files.slice()
|
? files.slice()
|
||||||
.sort((a, b) => a.path.localeCompare(b.path))
|
.sort((a, b) => a.path.localeCompare(b.path, undefined, {numeric: true}))
|
||||||
.map(file => <File
|
.map(file => <File
|
||||||
dispatch={dispatch}
|
dispatch={dispatch}
|
||||||
file={file}
|
file={file}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user