Skip to content

Commit 7085e13

Browse files
fix: reset pattern form when switching between include/exclude patterns (#417)
Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
1 parent 5799998 commit 7085e13

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/static/js/git_form.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@ function changePattern() {
88

99
// Skip the first tree line element
1010
treeLineElements.slice(2).forEach((element) => {
11-
element.classList.toggle('line-through');
12-
element.classList.toggle('text-gray-500');
11+
element.classList.remove('line-through');
12+
element.classList.remove('text-gray-500');
1313
});
14+
15+
// Reset the pattern input field
16+
const patternInput = document.getElementById('pattern');
17+
18+
if (patternInput) {
19+
patternInput.value = '';
20+
}
1421
}
1522

1623
// Show/hide the Personal-Access-Token section when the "Private repository" checkbox is toggled.

0 commit comments

Comments
 (0)