-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ui5-combobox initial implementation (#1123)
* feat: ui5-combobox initial implementation * add test for item selection * improve test page * add 3 types of filters * improve lazy loading sample * correct test after starts with per term implementation * add more tests
- Loading branch information
Showing
14 changed files
with
1,216 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<div class="ui5-combobox-root" | ||
role="combobox" | ||
aria-haspopup="listbox" | ||
aria-expanded="{{open}}" | ||
> | ||
|
||
<input id="ui5-combobox-input" | ||
.value="{{_tempValue}}" | ||
inner-input | ||
placeholder="{{placeholder}}" | ||
?disabled={{disabled}} | ||
?readonly={{readonly}} | ||
?required={{required}} | ||
value-state="{{valueState}}" | ||
@input="{{_input}}" | ||
@change="{{_inputChange}}" | ||
@keydown="{{_keydown}}" | ||
@focusin="{{_focusin}}" | ||
@focusout="{{_focusout}}" | ||
aria-autocomplete="both" | ||
/> | ||
|
||
{{#unless readonly}} | ||
<ui5-icon | ||
name="slim-arrow-down" | ||
slot="icon" | ||
tabindex="-1" | ||
input-icon | ||
?pressed="{{_iconPressed}}" | ||
@click="{{_arrowClick}}" | ||
dir="{{dir}}" | ||
></ui5-icon> | ||
{{/unless}} | ||
|
||
<ui5-popover | ||
class="ui5-combobox-popover" | ||
style={{styles.popover}} | ||
horizontal-align="Left" | ||
?no-arrow={{editable}} | ||
no-padding="true" | ||
placement-type="Bottom" | ||
initial-focus="ui5-combobox-input" | ||
@ui5-afterOpen={{_afterOpenPopover}} | ||
@ui5-afterClose={{_afterClosePopover}} | ||
> | ||
|
||
<ui5-busyindicator | ||
?active={{loading}} | ||
size="Medium" | ||
class="ui5-combobox-busy" | ||
> | ||
</ui5-busyindicator> | ||
|
||
<ui5-list | ||
separators="None" | ||
@ui5-itemClick={{_selectItem}} | ||
mode="SingleSelect" | ||
> | ||
{{#each _filteredItems}} | ||
<ui5-li | ||
type="Active" | ||
.mappedItem={{this}} | ||
?selected={{this.selected}} | ||
> | ||
{{this.text}} | ||
</ui5-li> | ||
{{/each}} | ||
</ui5-list> | ||
</ui5-popover> | ||
|
||
</div> |
Oops, something went wrong.