Bug: Cannot combine select, deselect event handlers
Bug: Cannot combine select, deselect event handlers
dtdev
Posts: 9Questions: 4Answers: 0
For the select extension, the "select" and "deselect" events can be defined separately, as shown in this example. However, using the standard jQuery event combination method (i.e., each event separated by a space) does not work:
e.g.,
table.DataTable().on("select deselect", function (e, dt, type, indexes) {
console.log("Not firing for both events...");
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi, You need to add the
.dt
namespace:With a single event it will automatically add the namespace for you - its a bug that it doesn't for multiple events - sorry.
Allan
Awesome, thanks! That fixed the problem.