mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 01:33:08 +02:00
paginate in offset mode when querying emoji - fixes #490
since the backend sorts emojis by name length when a query is present, the normal pagination with `sinceId` / `untilId` would not work reliably `offsetMode` is better in this case, although it will produce non-stable results if custom emojis that match the query are added or removed while we paginate
This commit is contained in:
parent
40f08617c4
commit
2bb313e145
1 changed files with 3 additions and 0 deletions
|
@ -98,6 +98,9 @@ const selectedEmojis = ref<string[]>([]);
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'admin/emoji/list' as const,
|
endpoint: 'admin/emoji/list' as const,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
|
offsetMode: computed(() => (
|
||||||
|
(query.value && query.value !== '') ? true : false
|
||||||
|
)),
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
query: (query.value && query.value !== '') ? query.value : null,
|
query: (query.value && query.value !== '') ? query.value : null,
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Reference in a new issue