Added max filter.
This commit is contained in:
@@ -28,7 +28,7 @@ export async function sortByIndex(index, query, asc, max) {
|
|||||||
.openCursor(query, asc ? 'next' : 'prev');
|
.openCursor(query, asc ? 'next' : 'prev');
|
||||||
while (cursor) {
|
while (cursor) {
|
||||||
events.push(cursor.value);
|
events.push(cursor.value);
|
||||||
if (cursor.length >= max) {
|
if (events.length >= max) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cursor = await cursor.continue();
|
cursor = await cursor.continue();
|
||||||
|
|||||||
@@ -45,7 +45,11 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div></div>
|
<div>
|
||||||
|
<label for="max">Max</label>
|
||||||
|
<input type="number" x-model.number="max" @input.debounce.750ms="reload" class="input" min="10">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
||||||
<div x-show="view === 'created_at'">
|
<div x-show="view === 'created_at'">
|
||||||
|
|||||||
Reference in New Issue
Block a user