Deselect current row after reload
Deselect current row after reload
Hello!
I have a task to select newly created entry on list, and deselect current, but there is something that i cant see.
I put my deselect current row and select newly added row in reload callback and that code works,
but immediately after that something is selecting current line again, and im unable to find what it is.
I found only that by setting rowId i can retain selection after reload, but its disabled in my config, so i guess it should not select current lines after reload anyway.
$(self.elementId).DataTable({
"ajax": self.dataSourceUrl,
"autoWidth": false,
"destroy": true,
"dom": self.html,
"serverSide": false,
"lengthMenu": self.lengthMenu,
"columns": self.columns,
"select": {
"style": "os",
"className": "active"
},
"language": {
"lengthMenu": "_MENU_",
"processing": "Loading... please wait"
},
"ordering": ! self.isSortable,
"rowReorder": self.isSortable,
"processing": false,
"info": self.showInformation,
"createdRow": events.onRowCreated,
"drawCallback": events.onTableDrawn
});
Answers
Hi @Sajgoniarz ,
It's hard to say what could be causing that interaction without seeing it running.
We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. 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