The right way to manipulate or delete elements of a backdraftjs component referenced by bdAttach?

7 Views Asked by At

How would you delete specific pieces of an element referenced via bdAttach?

Imagine ButtonRow is something that renders a bunch of Button elements.

class ButtonContainer extends Component {
    bdElements() {
        return e.div(
            e(ButtonRow, { bdAttach: myButtonRow })
        )
    }

    // delete all the Button components from theButtonRow
    clearTheButtons() {
        // this.myButtonRow.delChildren()  <-- does not work
        this.myButtonRow.innerHTML = ''; // works but is this OK?
    }
}
0

There are 0 best solutions below