mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix sorting of Languages and Software filters
This commit is contained in:
parent
037fcb2928
commit
0156ea23ff
2 changed files with 4 additions and 3 deletions
|
|
@ -33,7 +33,8 @@ const Filter = (props: any, languages: ILanguage[]) =>
|
|||
value={props.filter ? props.filter.value : "any"}>
|
||||
<option value="any">Any</option>
|
||||
{languages.length > 0
|
||||
? languages.map((l: ILanguage, i: number) => <option value={l.id} key={i}>{l.name}</option>)
|
||||
? languages.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((l: ILanguage, i: number) => <option value={l.id} key={i}>{l.name}</option>)
|
||||
: null}
|
||||
</select>;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const Filter = (props: any, software: ISoftware[]) =>
|
|||
value={props.filter ? props.filter.value : "any"}>
|
||||
<option value="any">Any</option>
|
||||
{software.length > 0
|
||||
? software.map(
|
||||
? software.sort((a, b) => a.name.localeCompare(b.name)).map(
|
||||
(s: ISoftware, i: number) => <option value={s.id} key={i}>{s.name}</option>)
|
||||
: null}
|
||||
</select>;
|
||||
|
|
@ -42,5 +42,5 @@ const Filter = (props: any, software: ISoftware[]) =>
|
|||
const Cell = (listSyntaxId: number, software: ISoftware[]) =>
|
||||
listSyntaxId
|
||||
? software.filter((s: ISoftware) => s.syntaxIds.indexOf(listSyntaxId) > -1)
|
||||
.map((s: ISoftware, i: number) => <SoftwareIcon id={s.id} key={i}/>)
|
||||
.map((s: ISoftware, i: number) => <SoftwareIcon id={s.id} key={i}/>)
|
||||
: null;
|
||||
Loading…
Reference in a new issue