@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.
- package/CHANGELOG.md +18 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ComboBox.d.ts +6 -0
- package/dist/ComboBox.js +31 -0
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItemTemplate.js +1 -1
- package/dist/ComboBoxItemTemplate.js.map +1 -1
- package/dist/ComboBoxPopoverTemplate.js +11 -1
- package/dist/ComboBoxPopoverTemplate.js.map +1 -1
- package/dist/ListItemBase.d.ts +4 -0
- package/dist/ListItemBase.js +32 -1
- package/dist/ListItemBase.js.map +1 -1
- package/dist/Select.js +14 -5
- package/dist/Select.js.map +1 -1
- package/dist/SelectTemplate.js +1 -1
- package/dist/SelectTemplate.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +9 -9
- package/src/ComboBoxItemTemplate.tsx +1 -1
- package/src/ComboBoxPopoverTemplate.tsx +13 -1
- package/src/SelectTemplate.tsx +0 -1
|
@@ -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.
|
|
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>
|
package/src/SelectTemplate.tsx
CHANGED
|
@@ -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}
|