Buttons extension - ID option (suggestion)
Buttons extension - ID option (suggestion)
ZakInterDev
Posts: 51Questions: 16Answers: 0
in Buttons
Hi guys
I'm trying to give my (Editor) buttons an ID, I've been looking in the docs but there doesn't seem to be any way of doing this. Is it possible this can be added, similar to how the title attribute is added? (https://datatables.net/reference/option/buttons.buttons.titleAttr)
I know I could do it with after the table has been initialised, but I think it looks neater if its added like the title attribute
Thanks in advance!
This discussion has been closed.
Answers
There is no option to add an id for the button I'm afraid. What do you want the ID for? I it is to use as a selector, you could just use
button().node()
instead.Allan
It is to use a selector but it was for my phpunit test. I did more digging after I posted this, and it looks like it doesn't handle JS too well. So will be looking more into Selenium
The id would be very useful for CSS styling. Please add support for this. With tabletools, the generated HTML included id attributes, so datatables has gone a step backwards here, it seems to me.