@fluid-topics/ft-text-field 1.3.45 → 1.3.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,10 +21,10 @@ class FtTextFieldSuggestion extends FtLitElement {
|
|
|
21
21
|
render() {
|
|
22
22
|
const classes = {
|
|
23
23
|
"ft-text-field-suggestion": true,
|
|
24
|
-
"ft-text-field-suggestion--with-helper": !!this.helper
|
|
24
|
+
"ft-text-field-suggestion--with-helper": !!this.helper,
|
|
25
25
|
};
|
|
26
26
|
return html `
|
|
27
|
-
<div class
|
|
27
|
+
<div class="${classMap(classes)}"
|
|
28
28
|
tabindex="-1"
|
|
29
29
|
@keydown=${this.onKeyDown}
|
|
30
30
|
@click=${this.confirmSuggestion}>
|
|
@@ -53,10 +53,10 @@ class FtTextFieldSuggestion extends FtLitElement {
|
|
|
53
53
|
this.dispatchEvent(new SuggestionSelectedEvent(this.getValue()));
|
|
54
54
|
}
|
|
55
55
|
getValue() {
|
|
56
|
-
return this.value || this.
|
|
56
|
+
return this.value || this.getTextContent();
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
return this.assignedNodes.map(n => n.textContent).join("").trim();
|
|
58
|
+
getTextContent() {
|
|
59
|
+
return this.assignedNodes.map((n) => n.textContent).join("").trim();
|
|
60
60
|
}
|
|
61
61
|
onKeyDown(event) {
|
|
62
62
|
if (["Enter", " "].includes(event.key)) {
|