datatables-refresh

1.0.1 • Public • Published

datatables-refresh

Plugin for JQuery Datatables. Adds the "refresh" button to DataTables which works with server-side processing.

Installation

npm

npm i datatables-refresh
/* Jquery Datatables */
import 'datatables.net/js/jquery.dataTables.js';
import 'datatables.net-dt/css/jquery.dataTables.css';
 
/* datatables-refresh */
import 'datatables-refresh/js/dataTables.refresh.js';

Direct <script> Include

<!-- Jquery Datatables -->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.16/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.16/js/jquery.dataTables.js"></script>
 
<!-- datatables-refresh -->
<script src="dataTables.refresh.js"></script>
table = $('table').DataTable({
  'dom': 'liRprt',
  'processing': true,
  'serverSide': true,
  'ajax': {
    'url': myUrl,
    'type': 'POST'
  },
  refresh: {
    name: 'Refresh',
    selector: 'btn btn-default' // for example, classes from Bootstrap Framework
  }
});

Package Sidebar

Install

npm i datatables-refresh

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

3.86 kB

Total Files

3

Last publish

Collaborators

  • brizhanev