Skip to content

Commit af77548

Browse files
committed
docs(aria/combobox): update the simple-combobox examples to open on click
1 parent 60234c2 commit af77548

13 files changed

Lines changed: 21 additions & 18 deletions

File tree

src/aria/simple-combobox/simple-combobox.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ describe('Combobox', () => {
12111211
[alwaysExpanded]="alwaysExpanded()"
12121212
[tabindex]="tabIndex()"
12131213
(focusout)="onBlur()"
1214+
(click)="popupExpanded.set(true)"
12141215
/>
12151216
12161217
<ng-template ngComboboxPopup [combobox]="combobox">
@@ -1556,6 +1557,7 @@ class ComboboxGridExample {
15561557
(input)="onInput()"
15571558
[disabled]="readonly()"
15581559
(focusout)="onBlur()"
1560+
(click)="combobox.expanded.set(true)"
15591561
/>
15601562
15611563
<ng-template ngComboboxPopup [combobox]="combobox">
@@ -1619,6 +1621,7 @@ class ComboboxListboxAutoSelectExample {
16191621
[(expanded)]="popupExpanded"
16201622
[inlineSuggestion]="value()[0] || options()[0]"
16211623
[disabled]="readonly()"
1624+
(click)="popupExpanded.set(true)"
16221625
/>
16231626
16241627
<ng-template ngComboboxPopup [combobox]="combobox">

src/components-examples/aria/simple-combobox/simple-combobox-auto-select/simple-combobox-auto-select-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-combobox-input-container">
33
<span class="material-symbols-outlined example-icon example-search-icon">search</span>
44
<input ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Search states..."
5-
[(value)]="searchString" [(expanded)]="popupExpanded" />
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (click)="popupExpanded.set(true)" />
66
</div>
77

88
<ng-template [cdkConnectedOverlay]="{origin, usePopover: 'inline', matchWidth: true}" [cdkConnectedOverlayOpen]="true"

src/components-examples/aria/simple-combobox/simple-combobox-autocomplete-auto-select/simple-combobox-autocomplete-auto-select-example.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
placeholder="Select a country"
99
[(value)]="searchString"
1010
[(expanded)]="popupExpanded"
11+
(click)="popupExpanded.set(true)"
1112
/>
1213
<button
1314
class="example-clear-button"

src/components-examples/aria/simple-combobox/simple-combobox-autocomplete-highlight/simple-combobox-autocomplete-highlight-example.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
placeholder="Select a country"
99
[(value)]="searchString"
1010
[(expanded)]="popupExpanded"
11+
(click)="popupExpanded.set(true)"
1112
[inlineSuggestion]="selectedOption()[0] || countries()[0]"
1213
/>
1314
<button

src/components-examples/aria/simple-combobox/simple-combobox-autocomplete-manual/simple-combobox-autocomplete-manual-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-autocomplete">
33
<span class="example-search-icon material-symbols-outlined" translate="no">search</span>
44
<input ngCombobox #combobox="ngCombobox" aria-label="Label dropdown" placeholder="Select a country"
5-
[(value)]="searchString" [(expanded)]="popupExpanded" />
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (click)="popupExpanded.set(true)" />
66
<button class="example-clear-button" aria-label="Clear" (keydown)="onKeydown($event)" (click)="clear()">
77
<span aria-hidden="true" class="example-clear-icon material-symbols-outlined">close</span>
88
</button>

src/components-examples/aria/simple-combobox/simple-combobox-datepicker/simple-combobox-datepicker-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<span class="material-symbols-outlined example-icon example-search-icon">calendar_month</span>
44
<input #comboboxInput ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Pick a date..."
55
[(value)]="selection" [(expanded)]="popupExpanded" aria-describedby="date-format-hint"
6-
(keydown)="onInputKeydown($event)" />
6+
(keydown)="onInputKeydown($event)" (click)="popupExpanded.set(true)" />
77
</div>
88

99
<ng-template [cdkConnectedOverlay]="{origin, usePopover: 'inline', matchWidth: false}"

src/components-examples/aria/simple-combobox/simple-combobox-grid/simple-combobox-grid-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-combobox-input-container">
33
<span class="material-symbols-outlined example-icon example-search-icon">search</span>
44
<input ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Search..."
5-
[(value)]="searchString" [(expanded)]="popupExpanded" (blur)="onBlur()" />
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (blur)="onBlur()" (click)="popupExpanded.set(true)" />
66
</div>
77

88
<ng-template [cdkConnectedOverlay]="{origin, usePopover: 'inline', matchWidth: true}" [cdkConnectedOverlayOpen]="true"

src/components-examples/aria/simple-combobox/simple-combobox-highlight/simple-combobox-highlight-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-combobox-input-container">
33
<span class="material-symbols-outlined example-icon example-search-icon">search</span>
44
<input ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Search states..."
5-
[(value)]="searchString" [(expanded)]="popupExpanded"
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (click)="popupExpanded.set(true)"
66
[inlineSuggestion]="selectedOption()[0] || options()[0]?.name" />
77
</div>
88

src/components-examples/aria/simple-combobox/simple-combobox-listbox/simple-combobox-listbox-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-combobox-input-container">
33
<span class="material-symbols-outlined example-icon example-search-icon">search</span>
44
<input ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Search..."
5-
[(value)]="searchString" [(expanded)]="popupExpanded" />
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (click)="popupExpanded.set(true)" />
66
</div>
77

88
<ng-template [cdkConnectedOverlay]="{origin, usePopover: 'inline', matchWidth: true}" [cdkConnectedOverlayOpen]="true"

src/components-examples/aria/simple-combobox/simple-combobox-tree-auto-select/simple-combobox-tree-auto-select-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div #origin class="example-combobox-input-container">
33
<span class="material-symbols-outlined example-icon example-search-icon">search</span>
44
<input ngCombobox #combobox="ngCombobox" class="example-combobox-input" placeholder="Search..."
5-
[(value)]="searchString" [(expanded)]="popupExpanded" />
5+
[(value)]="searchString" [(expanded)]="popupExpanded" (click)="popupExpanded.set(true)" />
66
</div>
77

88
<ng-template [cdkConnectedOverlay]="{origin, usePopover: 'inline', matchWidth: true}"

0 commit comments

Comments
 (0)