/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/menu/menu-item-selectable.ts
25 строк
834 B
Kristiyan Kostadinov
refactor(multiple): remove standalone flag from CDK
17 окт 2024, 17:40
17 окт 2024, 17:40
7fde1c2
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive, Input, booleanAttribute} from '@angular/core'; import {CdkMenuItem} from './menu-item'; /** Base class providing checked state for selectable MenuItems. */ @Directive({ host: { '[attr.aria-checked]': '!!checked', '[attr.aria-disabled]': 'disabled || null', }, }) export abstract class CdkMenuItemSelectable extends CdkMenuItem { /** Whether the element is checked */ @Input({alias: 'cdkMenuItemChecked', transform: booleanAttribute}) checked: boolean = false; /** Whether the item should close the menu if triggered by the spacebar. */ protected override closeOnSpacebarTrigger = false; }