sort group list in member page alphabetically
This commit is contained in:
parent
c58556fa8d
commit
bf413f2a26
@ -35,7 +35,8 @@
|
||||
$: indexOfFirstItem = indexOfLastItem - itemsPerPage;
|
||||
$: pageAmount = Math.ceil(groups.length / itemsPerPage);
|
||||
|
||||
$: slicedGroups = groups.slice(indexOfFirstItem, indexOfLastItem);
|
||||
$: orderedGroups = groups.sort((a, b) => a.name.localeCompare(b.name));
|
||||
$: slicedGroups = orderedGroups.slice(indexOfFirstItem, indexOfLastItem);
|
||||
|
||||
onMount(() => {
|
||||
fetchMember();
|
||||
|
Loading…
Reference in New Issue
Block a user