pivotal-energy-solutions / django-datatable-view

Server-side datatable representations for Django querysets for automatic rendering in templates
Apache License 2.0
347 stars 141 forks source link

Use sInfoEmpty if iTotal==0 #258

Closed jherskovic closed 11 months ago

jherskovic commented 2 years ago

The "Showing 1 to 0 of 0 entries" at the bottom of empty tables was bothering me, so I looked into the datatables.js documentation and discovered that they provide a sInfoEmpty string to represent empty tables.

I made this small change to use sInfoEmpty when the total number of rows = 0, and now the table correctly displays "showing 0 to 0 of 0 entries" when there's no data.