How to use "data-search" html5 data attributes with programmatically inserted data?

How to use "data-search" html5 data attributes with programmatically inserted data?

MojimiMojimi Posts: 4Questions: 2Answers: 0
edited February 2018 in Free community support

I would like to know if I can somehow add the "data-search" attribute or functionality if my data is added via Javascript?

For example :

const dtable = $('table').DataTable();
dtable.row.add({
    data-search : "1",
    data : "one"
})

I need this as my displayed data have aliases that are different from what needs to be searched.

Worth nothing that I'm also using the Scroller plugin.

This discussion has been closed.