Skip to content

Commit 4c7ba0c

Browse files
committed
hides the toggle all input when using the filter
1 parent 3eae4a1 commit 4c7ba0c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/ruby_ui/combobox/combobox_controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ export default class extends Controller {
8484
}
8585

8686
const filterTerm = this.searchInputTarget.value.toLowerCase()
87+
88+
if (this.hasToggleAllTarget) {
89+
if (filterTerm) this.toggleAllTarget.parentElement.classList.add("hidden")
90+
else this.toggleAllTarget.parentElement.classList.remove("hidden")
91+
}
92+
8793
let resultCount = 0
8894

8995
this.selectedItemIndex = null

0 commit comments

Comments
 (0)