fix app sorting
This commit is contained in:
parent
30d9899bb7
commit
6b7d07c926
|
@ -86,15 +86,12 @@
|
||||||
$: userPage = $userPageInfo.page
|
$: userPage = $userPageInfo.page
|
||||||
$: logsPage = $logsPageInfo.page
|
$: logsPage = $logsPageInfo.page
|
||||||
|
|
||||||
$: enrichedList = enrich($users.data || [], selectedUsers, "_id")
|
$: sortedUsers = sort(enrich($users.data, selectedUsers, "_id"), "email")
|
||||||
$: sortedList = sort(enrichedList, "email")
|
|
||||||
|
|
||||||
$: sortedEvents = sort(
|
$: sortedEvents = sort(
|
||||||
enrich(parseEventObject($auditLogs.events), selectedEvents, "id"),
|
enrich(parseEventObject($auditLogs.events), selectedEvents, "id"),
|
||||||
"id"
|
"id"
|
||||||
)
|
)
|
||||||
// below is not sorting yet
|
$: sortedApps = sort(enrich($apps, selectedApps, "appId"), "name")
|
||||||
$: sortedApps = enrich($apps, selectedApps, "appId")
|
|
||||||
|
|
||||||
const debounce = value => {
|
const debounce = value => {
|
||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
|
@ -164,7 +161,8 @@
|
||||||
return list.map(item => {
|
return list.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
selected: selected.find(x => x === item[key]) != null,
|
selected:
|
||||||
|
selected.find(x => x === item[key] || x.includes(item[key])) != null,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -264,7 +262,7 @@
|
||||||
bind:value={selectedUsers}
|
bind:value={selectedUsers}
|
||||||
getOptionValue={user => user._id}
|
getOptionValue={user => user._id}
|
||||||
getOptionLabel={user => user.email}
|
getOptionLabel={user => user.email}
|
||||||
options={sortedList}
|
options={sortedUsers}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
|
|
Loading…
Reference in New Issue