1.0.13 • Published 6 years ago

turbo-datatables-response v1.0.13

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Node Datatables

Server-side response generator in the correct format for datatables.

Installation

Inside the vue project run:

npm i turbo-datatables-response

Quickstart

    // Optionally you can give the Datatables the mysql connection.
    const datatables = await Datatables();
    
    // Set the inputs from the client.
    datatables.setInputs(inputs);

    // supply the table name and the columns you need. 
    datatables.of('users').only(['id', 'name', 'email']);
    
    // or use the inverse
    // dt.of('users').hide(['password']);

    // Edit rows values on the fly.
    datatables.edit('name', (row) => {
        return 'Test '+row.name;
    });

    // Generates the response.
    let response = await datatables.make();

    // after the promise has been resolved
    // you will get a json object to return to the client.

Todo

  • Allow to modify rows values.
  • Allow to modify columns labels.
1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago