Skip to content

Commit

Permalink
Merge pull request #1185 from valadas/label-float-autocomplete
Browse files Browse the repository at this point in the history
Fixed an issue where label would cover text in dnn-autocomplete
  • Loading branch information
david-poindexter authored Sep 30, 2024
2 parents f7b2fac + 286351c commit f9713b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class DnnAutocomplete {

private handleInput(e: Event) {
const value = (e.target as HTMLInputElement).value;
this.value = value;
var valid = this.inputField.checkValidity();
this.valid = valid;
this.valueInput.emit(value);
Expand Down Expand Up @@ -225,7 +226,7 @@ export class DnnAutocomplete {
this.selectedIndex = Math.max(this.selectedIndex - 1, 0);
}
}
this.value = this.suggestions[this.selectedIndex]?.value;
this.value = this.suggestions[this.selectedIndex]?.value || this.value;
if (e.key === "Enter") {
var selectedItem = this.suggestions[this.selectedIndex];
this.value = selectedItem.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export class DnnTextarea {

componentWillLoad() {
this.labelId = generateRandomId();
}

componentDidLoad() {
this.textarea.style.minHeight = `${this.rows * 1.5}em`;
}

Expand Down

0 comments on commit f9713b9

Please sign in to comment.