enable/disable custom buttons just like Edit/New/Delete

enable/disable custom buttons just like Edit/New/Delete

rldean1rldean1 Posts: 141Questions: 66Answers: 1
edited March 2020 in Editor

I have Editor. I've created two custom buttons...

I can .enable() the buttons on row click .on('click', 'tr', function (). I also have the capability to do this with the select event .on( 'select', function ( e, dt, type, indexes )

What I can't figure out is how to handle what happens when there is no selection, specifically after Editor finishes processing a Create, Edit, or Remove action. Like, after a DELETE, there is no selection, yet my custom buttons are still enabled.

How do I get my custom buttons to be toggled in the same way as the built-in Edit & Delete buttons?

One possible caveat is that I don't allow deselects: toggleable: false

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.