Skip to content

Convert existing table to paginated table, Best suitable for server rendered html table.

Notifications You must be signed in to change notification settings

gunabalans/data-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

data-table

Convert existing table to paginated table, boostrap based style

Best suitable for server rendered html table.

composer require netkathir/data-table

Netkathir data table

@Example: add id to table

Add page size select box where required

     <select
        onchange="Netkathir.paging()"
        class="form-control sm"
        id="pagesize"
        style="width: 60px">
        <option selected="selected" value="10">10</option>
        <option value="25">25</option>
        <option value="50">50</option>
        <option value="100">100</option>
        <option value="500">500</option>
      </select>

add paging container where u want

<nav id="pagination"></nav>
Call paging onload (default values - you can change)
 <script>
   Netkathir.start({
     tableId: "#data-table1",
     getPageSizeFrom: "#pagesize",
     paginationContainer: "#pagination"
   });
 </script>

image

License

data-table is opensource software licensed under the MIT license.