Destroy only nested table

Destroy only nested table

blueghostukblueghostuk Posts: 6Questions: 2Answers: 0

Hi,

please see the example here - https://jsfiddle.net/7001odLg/

basically I only want the destroy method to apply to the inner table and keep the outer table intact, yet the event propagates up and deletes the outer table as well.

Am I doing completely the wrong thing here?

Thanks,

Michael

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @blueghostuk ,

    I see what you're saying, you wouldn't expect both buttons to disappear. I think it's a bug in Buttons, as if you remove it and the B in the dom it seems to behave. I'm just about to shutdown, but I'll take a longer look over the weekend or next week.

    Cheers,

    Colin

  • blueghostukblueghostuk Posts: 6Questions: 2Answers: 0

    Hi Colin,

    Yes you may be correct it's just the buttons being destroyed, I hadn't looked into it in that much detail and assumed the whole table was destroyed.

    Thanks,

    Michael

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Hi Michael,

    Thanks for letting us know about that! Colin's analysis was spot on and your test case was a huge help to sorting this out. Fix committed here and the nightly will carry the fix soon.

    The next release of Buttons (which should be before the end of the month) will contain the fix as well.

    Allan

  • blueghostukblueghostuk Posts: 6Questions: 2Answers: 0

    Thanks guys for the fix, will try this out soon.

This discussion has been closed.