/
githubmirror
/
tabby
Обзор
Документация
Войти
/
githubmirror
/
tabby
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tabby-core/src/components/renameTabModal.component.ts
32 строки
790 B
Eugene Pankov
lint
10 апр 2023, 22:21
Не верифицирован
10 апр 2023, 22:21
3b8ca0d
Код
Авторство
О чём код?
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { Component, Input, ElementRef, ViewChild } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' /** @hidden */ @Component({ selector: 'rename-tab-modal', templateUrl: './renameTabModal.component.pug', }) export class RenameTabModalComponent { @Input() value: string @ViewChild('input') input: ElementRef constructor ( private modalInstance: NgbActiveModal, ) { } ngOnInit () { setTimeout(() => { this.input.nativeElement.focus() this.input.nativeElement.select() }, 250) } save () { this.modalInstance.close(this.value) } close () { this.modalInstance.dismiss() } }