Skip to content

Conversation

@kasemsun-su
Copy link

Add support for sort column like this
dataTable.columns(3).search( keyword ).draw();

code on nodejs back-end will be like this

Order.dataTables({
    limit: req.body.length,
    skip: req.body.start,
    search: {
        value: req.body.search.value,
        fields: ["order_no", "store_name", "vehicle_code"]
    },
    columns: [{
        value: req.body.columns[3].search.value,
        fields: ["zone"]
    }],
    sort: sortColumn(req.body,["order_no","order_date","zone","store_name","total_amount","vehicle_code","order_status"])
}).then(function (table) {
    .....
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant