Buttons extension - ID option (suggestion)

Buttons extension - ID option (suggestion)

ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

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!

Answers

  • allanallan Posts: 63,510Questions: 1Answers: 10,471 Site admin

    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

  • ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

    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 :)

  • petripetri Posts: 2Questions: 1Answers: 0

    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.

This discussion has been closed.