@ui5/webcomponents 2.21.0-rc.2 → 2.21.0-rc.3

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.
@@ -7,6 +7,7 @@ import Popover from "./Popover.js";
7
7
  import ResponsivePopover from "./ResponsivePopover.js";
8
8
  import BusyIndicator from "./BusyIndicator.js";
9
9
  import SuggestionItem from "./SuggestionItem.js";
10
+ import generateHighlightedMarkupFirstMatch from "@ui5/webcomponents-base/dist/util/generateHighlightedMarkupFirstMatch.js";
10
11
  import type ComboBox from "./ComboBox.js";
11
12
 
12
13
  export default function ComboBoxPopoverTemplate(this: ComboBox) {
@@ -53,7 +54,18 @@ export default function ComboBoxPopoverTemplate(this: ComboBox) {
53
54
  onInput={this._handleMobileInput}
54
55
  onChange={this._inputChange}
55
56
  >
56
- { this._filteredItems.map(item => <SuggestionItem text={item.text} additional-text={item.additionalText}/>)}
57
+ { this._filteredItems.flatMap(item => {
58
+ if (item.isGroupItem && item.items) {
59
+ // For group items, return all nested items
60
+ return item.items
61
+ .filter(nestedItem => !!nestedItem)
62
+ .map(nestedItem =>
63
+ <SuggestionItem text={nestedItem.text} additional-text={nestedItem.additionalText} markupText={generateHighlightedMarkupFirstMatch(nestedItem.text || "", this.filterValue)}/>
64
+ );
65
+ }
66
+ // For regular items
67
+ return <SuggestionItem text={item.text} additional-text={item.additionalText} markupText={generateHighlightedMarkupFirstMatch(item.text || "", this.filterValue)}/>;
68
+ })}
57
69
  </Input>
58
70
  </div>
59
71
  </div>
@@ -38,7 +38,6 @@ export default function SelectTemplate(this: Select) {
38
38
  aria-expanded={this._isPickerOpen}
39
39
  aria-roledescription={this._ariaRoleDescription}
40
40
  onKeyDown={this._onkeydown}
41
- onKeyPress={this._handleKeyboardNavigation}
42
41
  onKeyUp={this._onkeyup}
43
42
  onFocusIn={this._onfocusin}
44
43
  onFocusOut={this._onfocusout}