Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45b75dd

Browse files
Update src/autocomplete.ts
Co-authored-by: Manuel Puyol <[email protected]>
1 parent a59d75d commit 45b75dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/autocomplete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class Autocomplete {
3131
this.combobox = new Combobox(input, results)
3232
this.feedback = document.getElementById(`${this.results.id}-feedback`)
3333
this.autoselectEnabled = autoselectEnabled
34-
this.clearButton = document.getElementById(`${this.input.id || this.input.getAttribute('name')}-clear`)
34+
this.clearButton = document.getElementById(`${this.input.id || this.input.name}-clear`)
3535

3636
// check to see if there are any default options provided
3737
this.clientOptions = results.querySelectorAll('[role=option]')

0 commit comments

Comments
 (0)