When using SmartQueryBuilder you can ‘destroy’ it by using the remove() method like in the following code snippet:
let queryBuilder = document.getElementById('queryBuilder');
One thing to note here is that the remove() method removes the element from DOM.
Let me know if that works for you!
Please, do not hesitate to contact us if you have any additional questions.
Smart UI Team https://www.htmlelements.com/