@fluid-topics/ft-search-input 2.0.32 → 2.0.34
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.
- package/build/ft-search-input.d.ts +1 -1
- package/build/ft-search-input.js +16 -10
- package/build/ft-search-input.light.js +924 -922
- package/build/ft-search-input.min.js +1083 -1081
- package/package.json +10 -10
|
@@ -29,7 +29,7 @@ export declare class FtSearchInput extends FtSearchInput_base implements FtSearc
|
|
|
29
29
|
private onSearchBarKeyUp;
|
|
30
30
|
private onInput;
|
|
31
31
|
private onClearInput;
|
|
32
|
-
|
|
32
|
+
launchSearch(query: string): void;
|
|
33
33
|
onSuggestionSelected(value: string): void;
|
|
34
34
|
get shouldDisplaySuggestions(): boolean;
|
|
35
35
|
private onClick;
|
package/build/ft-search-input.js
CHANGED
|
@@ -142,8 +142,19 @@ export class FtSearchInput extends withI18n(FtSearchComponent) {
|
|
|
142
142
|
}
|
|
143
143
|
break;
|
|
144
144
|
case "Enter": {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
// Select suggested option if applicable
|
|
146
|
+
const elementToClick = this.suggestions.selectedSuggestOption;
|
|
147
|
+
if (elementToClick) {
|
|
148
|
+
elementToClick.click();
|
|
149
|
+
break; // Clicking the selected suggestion will already launch a search
|
|
150
|
+
}
|
|
151
|
+
// Launch search
|
|
152
|
+
if (this.useCustomSearchPath) {
|
|
153
|
+
this.launchSearchButton.click();
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
this.launchSearch(this.liveQuery);
|
|
157
|
+
}
|
|
147
158
|
break;
|
|
148
159
|
}
|
|
149
160
|
case "Backspace":
|
|
@@ -156,14 +167,6 @@ export class FtSearchInput extends withI18n(FtSearchComponent) {
|
|
|
156
167
|
case "Backspace":
|
|
157
168
|
e.stopPropagation();
|
|
158
169
|
break;
|
|
159
|
-
case "Enter":
|
|
160
|
-
if (this.useCustomSearchPath) {
|
|
161
|
-
this.launchSearchButton.click();
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
this.launchSearch(this.liveQuery);
|
|
165
|
-
}
|
|
166
|
-
break;
|
|
167
170
|
default:
|
|
168
171
|
break;
|
|
169
172
|
}
|
|
@@ -273,6 +276,9 @@ __decorate([
|
|
|
273
276
|
__decorate([
|
|
274
277
|
query(`[part="launch-search-in-input"]`)
|
|
275
278
|
], FtSearchInput.prototype, "launchSearchButton", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
ignoreComposingEvents()
|
|
281
|
+
], FtSearchInput.prototype, "onSearchBarKeyDown", null);
|
|
276
282
|
__decorate([
|
|
277
283
|
ignoreComposingEvents()
|
|
278
284
|
], FtSearchInput.prototype, "onSearchBarKeyUp", null);
|