I am having trouble resetting a list in my modal. When I open the modal again, the list still contains items from the previous order and only the first input box is cleared. This seems to be a bug and I have reported it to the team by creating a GitHub issue.
innerHTML property with an empty string to remove all the child nodes.
Here's an example code snippet:
const list = document.getElementById('list');list.innerHTML = '';
This code will select the HTML element with the ID 'list', which represents the list container, and set its
innerHTML property to an empty string. This will remove all the child nodes of the list container, including the list items from the previous order.