/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update/index.ts
23 строки
694 B
Sheik Althaf
refactor(devtools): use signal apis in profiler and frame-selector (#57558)
28 окт 2024, 22:28
28 окт 2024, 22:28
d98d7dc
Код
Авторство
О чём код?
/** * @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 {signal} from '@angular/core'; // This service is used to notify the CDK virtual scroll parents // when the tab has changed. Alternatively, we risk to have broken // layout since the virtual scroll is nested inside of a TabGroup // which doesn't have consistent dimensions when collapsed and expanded. export class TabUpdate { private _tabUpdate = signal<string>(''); tabUpdate = this._tabUpdate.asReadonly(); notify(tab: string): void { this._tabUpdate.set(tab); } }