Skip to content

Commit

Permalink
feat: clear output on each request
Browse files Browse the repository at this point in the history
  • Loading branch information
nronzel committed Feb 10, 2024
1 parent 3e5d0cd commit 1ce2b2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ const IndexTemplate = `
</body>
<script>
document.body.addEventListener('htmx:configRequest', function(event) {
var outputContainer = document.getElementById('output');
outputContainer.innerHTML = '';
// Hide and clear the error message when a new request is being configured
var errorContainer = document.getElementById('error-message');
// errorContainer.style.display = 'none'; // Hide the container
errorContainer.innerHTML = ''; // Clear any existing error message
});
</script>
Expand Down

0 comments on commit 1ce2b2d

Please sign in to comment.