Removing a button on init also removing the button after it

Removing a button on init also removing the button after it

CoreBioCoreBio Posts: 12Questions: 5Answers: 0
edited April 2016 in Buttons

I think this may be a bug, but when I have a button that on init I remove, it is also removing the button after it. On init, I run a check as to wether the button should be there or not, and if not, I remove it. Here is an example:

http://live.datatables.net/xogijufe/1/edit

On init, I tell it to remove the delete button, but then it is also removing the selectAll button when it shouldn't be.

If this is a bug, I am happy to open an issue on github. If not, is there something I am doing wrong? Or some other way I should accomplish the same thing?

Thanks for the help,
David B

Answers

  • allanallan Posts: 62,082Questions: 1Answers: 10,178 Site admin

    Hi David,

    Thanks for posting this - it does indeed look like a bug. I'll dig into it tomorrow. No need to post it in github as well as here.

    Thanks,
    Allan

  • CoreBioCoreBio Posts: 12Questions: 5Answers: 0

    Hey Allan,

    Sorry to follow up, but I was wondering if you had an update or maybe a workaround for now.

    Thanks,
    David B

  • allanallan Posts: 62,082Questions: 1Answers: 10,178 Site admin

    Hi,

    Sorry I haven't had a chance to look into this yet. I'll post back here as soon as I do.

    Allan

  • allanallan Posts: 62,082Questions: 1Answers: 10,178 Site admin

    Sorry for the delay looking into this! I've just committed the fix. It will be in Buttons 1.2.0 which should be out next week and the nightly will rebuild in the next few minutes with the change.

    Regards,
    Allan

  • CoreBioCoreBio Posts: 12Questions: 5Answers: 0

    Awesome, thank you so much Allan! Ill let you know if I have any further problems with it

    David B

This discussion has been closed.