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');
|
||||
while (cursor) {
|
||||
events.push(cursor.value);
|
||||
if (cursor.length >= max) {
|
||||
if (events.length >= max) {
|
||||
break;
|
||||
}
|
||||
cursor = await cursor.continue();
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</select>
|
||||
</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 x-show="view === 'created_at'">
|
||||
|
||||
Reference in New Issue
Block a user