How I can re-render a function when I change the page
How I can re-render a function when I change the page
cessloop
Posts: 1Questions: 1Answers: 0
When starting my datatable, I have 4 functions to render HTML elements (select, inputs, etc) within each cell, but when I change the page, these functions no longer do anything and I lose their functionality, how can I do it so that when change page, these functions stay ready to render again
const
notSet = '<span class="text-muted">-</span>',
options = {
...setDefaultOptions(),
data: data,
rowId: 'idEnrollment',
columns: [
{ data: 'firstName', defaultContent: notSet },
{ data: 'lastName', defaultContent: notSet },
{
data: 'enrollment',
defaultContent: notSet,
render: (data, type, row) => this.createInput(data, type, row)
},
{
data: 'status',
defaultContent: notSet,
render: (data, type, row) => this.createSelect(data, type, row)
},
{
data: 'effectiveDate',
defaultContent: notSet,
render: (data, type, row) => this.createInputDate(data, type, row)
},
{ data: 'date', defaultContent: notSet },
{
data: 'log',
defaultContent: notSet,
render: (data, type, row) => this.createInputLog(data, type, row)
}
]
},
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
See this FAQ. If this doesn't help then please provide the test case Colin asked for.
Kevin