mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-05 14:01:43 +02:00
[#478] load selected relation items before the other options
This commit is contained in:
1 parent
978fdd3ce7
commit
9814dda8e4
12 files changed
+22
-22
No files matched your search
@@ -23,9 +23,9 @@
|
||||
|
||||
$: canLoadMore = totalItems > list.length;
|
||||
|
||||
loadList(true);
|
||||
|
||||
loadSelected();
|
||||
loadList(true).then(() => {
|
||||
loadSelected();
|
||||
});
|
||||
|
||||
async function loadSelected() {
|
||||
const selectedIds = CommonHelper.toArray(keyOfSelected);
|
||||
@@ -76,11 +76,11 @@
|
||||
});
|
||||
|
||||
if (reset) {
|
||||
list = [];
|
||||
list = CommonHelper.toArray(selected).slice();
|
||||
}
|
||||
|
||||
list = CommonHelper.filterDuplicatesByKey(
|
||||
CommonHelper.toArray(selected).concat(list, result.items)
|
||||
list.concat(result.items, CommonHelper.toArray(selected))
|
||||
);
|
||||
currentPage = result.page;
|
||||
totalItems = result.totalItems;
|
||||
|
||||
Reference in new issue
Block a user