Skip to content

Commit bef8d29

Browse files
committed
Clear search input and error message when graph is redrawn in dependency graph webview
1 parent 9041312 commit bef8d29

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

vscode-rescriptdep/src/extension.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,19 @@ function showDotGraphWebview(context: vscode.ExtensionContext, dotContent: strin
18531853
isFocusedMode = message.isFocusedMode;
18541854
centerModule = message.centerModule;
18551855
1856+
// Clear search input when graph is redrawn
1857+
const searchInput = document.getElementById('module-search');
1858+
if (searchInput) {
1859+
searchInput.value = '';
1860+
searchInput.classList.remove('not-found');
1861+
1862+
// Clear any error message
1863+
const searchMessage = document.getElementById('search-message');
1864+
if (searchMessage) {
1865+
searchMessage.classList.remove('visible');
1866+
}
1867+
}
1868+
18561869
// Re-render with new data
18571870
renderGraph();
18581871

0 commit comments

Comments
 (0)