datasette-cluster-map
datasette-cluster-map copied to clipboard
Showing 1,000 of 10,001 bug
This happens on more recent versions of Datasette that don't show the full count.
Easiest fix is to show "Showing 1,000 of >10,000".
The API we call is /data/Street_Tree_List.json?_size=max&_labels=on&_extra=count&_extra=next_url&_shape=objects
Which now returns:
{
"ok": true,
"next": "1000",
"next_url": ".../data/Street_Tree_List.json?_size=max&_labels=on&_extra=count&_extra=next_url&_shape=objects&_next=1000",
"count": 10001,
"rows": [],
"truncated": false
}
Can we tell from this that the 10,001 number actually represents "there's at least one more page"?
I'm not sure we can. May need a supporting change in Datasette itself.
In the template: https://github.com/simonw/datasette/blob/d021ce97aa60c48441bad7a976112b2bb11f6ccd/datasette/templates/table.html#L44
{% if count == count_limit + 1 %}>{{ "{:,}".format(count_limit) }} rows
We don't expose count_limit in the JSON yet.