0
Siyeza created
how do I pass this parameter
listAction: { ajaxFunction: _contactsService.getContactsByPolicyHolderId, inputFilter: function () { return { policyHolderId: 2 }; } },
SEE THE ERROR below
![image.png](/QA/files/fa5fa836dc4ca95dca5e39f190e9ba26.png)
1 Answer(s)
-
0
You could do:
<a class="example" data-contact-id="2"></a>
listAction: { ajaxFunction: _contactsService.getContactsByPolicyHolderId, inputFilter: function () { return { id: $(".example").attr("data-contact-id") }; } },
The returned data can then be evaluated in the column render function:
{ targets: 0, data: null, orderable: false, render: function (data) { return data; } },