/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material-experimental/selection/row-selection.ts
31 строка
1 KB
Kristiyan Kostadinov
refactor(multiple): remove standalone flag from experimental packages
17 окт 2024, 17:40
17 окт 2024, 17:40
0c0b122
Код
Авторство
О чём код?
/** * @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 {CdkRowSelection} from '@angular/cdk-experimental/selection'; import {Input, Directive} from '@angular/core'; /** * Applies `mat-selected` class and `aria-selected` to an element. * * Must be used within a parent `MatSelection` directive. * Must be provided with the value. The index is required if `trackBy` is used on the `CdkSelection` * directive. */ @Directive({ selector: '[matRowSelection]', host: { '[class.mat-selected]': '_selection.isSelected(this.value, this.index)', '[attr.aria-selected]': '_selection.isSelected(this.value, this.index)', }, providers: [{provide: CdkRowSelection, useExisting: MatRowSelection}], inputs: [{name: 'index', alias: 'matRowSelectionIndex'}], }) export class MatRowSelection<T> extends CdkRowSelection<T> { /** The value that is associated with the row */ @Input('matRowSelectionValue') override value: T = undefined!; }