Skip to content

Commit 913ca2e

Browse files
main - 5564d7d feat(cdk/menu): add setActiveMenuItem to cdkMenu (#31371)
1 parent a929a34 commit 913ca2e

2 files changed

Lines changed: 116 additions & 8 deletions

File tree

docs-content/api-docs/cdk-menu.html

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,42 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
793793

794794

795795

796+
797+
798+
<table class="docs-api-method-table">
799+
<thead>
800+
<tr class="docs-api-method-name-row">
801+
<th colspan="2" class="docs-api-method-name-cell">setActiveMenuItem
802+
</th>
803+
</tr>
804+
</thead><tr class="docs-api-method-description-row">
805+
<td colspan="2" class="docs-api-method-description-cell">
806+
<p>Sets the active item to the item at the specified index and focuses the newly active item.</p>
807+
808+
</td>
809+
</tr><thead>
810+
<tr class="docs-api-method-parameters-header-row">
811+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
812+
</tr>
813+
</thead>
814+
815+
<tr class="docs-api-method-parameter-row">
816+
<td class="docs-api-method-parameter-cell">
817+
<p class="docs-api-method-parameter-name">
818+
item</p>
819+
<code class="docs-api-method-parameter-type">number | CdkMenuItem</code>
820+
</td>
821+
<td class="docs-api-method-parameter-description-cell">
822+
<p class="docs-api-method-parameter-description">
823+
<p>The index of the item to be set as active, or the CdkMenuItem instance.</p>
824+
825+
</p>
826+
</td>
827+
</tr>
828+
</table>
829+
830+
831+
796832

797833

798834

@@ -997,6 +1033,42 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
9971033

9981034

9991035

1036+
1037+
1038+
<table class="docs-api-method-table">
1039+
<thead>
1040+
<tr class="docs-api-method-name-row">
1041+
<th colspan="2" class="docs-api-method-name-cell">setActiveMenuItem
1042+
</th>
1043+
</tr>
1044+
</thead><tr class="docs-api-method-description-row">
1045+
<td colspan="2" class="docs-api-method-description-cell">
1046+
<p>Sets the active item to the item at the specified index and focuses the newly active item.</p>
1047+
1048+
</td>
1049+
</tr><thead>
1050+
<tr class="docs-api-method-parameters-header-row">
1051+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
1052+
</tr>
1053+
</thead>
1054+
1055+
<tr class="docs-api-method-parameter-row">
1056+
<td class="docs-api-method-parameter-cell">
1057+
<p class="docs-api-method-parameter-name">
1058+
item</p>
1059+
<code class="docs-api-method-parameter-type">number | CdkMenuItem</code>
1060+
</td>
1061+
<td class="docs-api-method-parameter-description-cell">
1062+
<p class="docs-api-method-parameter-description">
1063+
<p>The index of the item to be set as active, or the CdkMenuItem instance.</p>
1064+
1065+
</p>
1066+
</td>
1067+
</tr>
1068+
</table>
1069+
1070+
1071+
10001072

10011073

10021074

@@ -1323,6 +1395,42 @@ <h5 class="docs-api-h5 docs-api-method-header">Methods</h5>
13231395

13241396

13251397

1398+
1399+
1400+
<table class="docs-api-method-table">
1401+
<thead>
1402+
<tr class="docs-api-method-name-row">
1403+
<th colspan="2" class="docs-api-method-name-cell">setActiveMenuItem
1404+
</th>
1405+
</tr>
1406+
</thead><tr class="docs-api-method-description-row">
1407+
<td colspan="2" class="docs-api-method-description-cell">
1408+
<p>Sets the active item to the item at the specified index and focuses the newly active item.</p>
1409+
1410+
</td>
1411+
</tr><thead>
1412+
<tr class="docs-api-method-parameters-header-row">
1413+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
1414+
</tr>
1415+
</thead>
1416+
1417+
<tr class="docs-api-method-parameter-row">
1418+
<td class="docs-api-method-parameter-cell">
1419+
<p class="docs-api-method-parameter-name">
1420+
item</p>
1421+
<code class="docs-api-method-parameter-type">number | CdkMenuItem</code>
1422+
</td>
1423+
<td class="docs-api-method-parameter-description-cell">
1424+
<p class="docs-api-method-parameter-description">
1425+
<p>The index of the item to be set as active, or the CdkMenuItem instance.</p>
1426+
1427+
</p>
1428+
</td>
1429+
</tr>
1430+
</table>
1431+
1432+
1433+
13261434

13271435

13281436

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/components-examples",
3-
"version": "20.1.0-next.1+sha-55da06f",
3+
"version": "20.1.0-next.1+sha-5564d7d",
44
"description": "Angular Components Examples",
55
"private": true,
66
"repository": {
@@ -259,15 +259,15 @@
259259
},
260260
"homepage": "https://github.com/angular/components#readme",
261261
"peerDependencies": {
262-
"@angular/cdk": "20.1.0-next.1+sha-55da06f",
263-
"@angular/cdk-experimental": "20.1.0-next.1+sha-55da06f",
262+
"@angular/cdk": "20.1.0-next.1+sha-5564d7d",
263+
"@angular/cdk-experimental": "20.1.0-next.1+sha-5564d7d",
264264
"@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
265265
"@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
266-
"@angular/material": "20.1.0-next.1+sha-55da06f",
267-
"@angular/material-experimental": "20.1.0-next.1+sha-55da06f",
268-
"@angular/material-moment-adapter": "20.1.0-next.1+sha-55da06f",
269-
"@angular/material-luxon-adapter": "20.1.0-next.1+sha-55da06f",
270-
"@angular/material-date-fns-adapter": "20.1.0-next.1+sha-55da06f"
266+
"@angular/material": "20.1.0-next.1+sha-5564d7d",
267+
"@angular/material-experimental": "20.1.0-next.1+sha-5564d7d",
268+
"@angular/material-moment-adapter": "20.1.0-next.1+sha-5564d7d",
269+
"@angular/material-luxon-adapter": "20.1.0-next.1+sha-5564d7d",
270+
"@angular/material-date-fns-adapter": "20.1.0-next.1+sha-5564d7d"
271271
},
272272
"devDependencies": {
273273
"@angular/cdk": "workspace:*",

0 commit comments

Comments
 (0)