Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const tabel_dt = $("#table_1").DataTable({
- initComplete: function() {
- var api = this.api();
- $('#mytable_filter input')
- .off('.DT')
- .on('keyup.DT', function(e) {
- if (e.keyCode == 13) {
- api.search(this.value).draw();
- }
- });
- },
- oLanguage: {
- sProcessing: "loading..."
- },
- processing: true,
- serverSide: true,
- responsive: true,
- ajax: {
- url: "<?= base_url(); ?>admin/transaksi/json",
- type: "POST",
- dataType: 'json',
- },
- columns: [{
- "data": "transaksi_id",
- "orderable": true,
- "responsivePriority": 1,
- }, {
- "data": "status",
- "orderable": true,
- "responsivePriority": 9,
- }, {
- "data": "waktu_create",
- "orderable": true,
- "responsivePriority": 10,
- }, {
- "data": "waktu_update"
- },
- {
- "data": "action",
- "orderable": false,
- "className": "text-center",
- "responsivePriority": 13,
- },
- ],
- order: [
- [0, 'desc']
- ],
- rowCallback: function(row, data, iDisplayIndex) {
- }
- });
- tabel_dt.row.add({
- transaksi_id: '1',
- status: "Sukses",
- waktu_create: ".....",
- waktu_update: "....",
- }).draw(false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement