UNPKG

bb-inline-editor

Version:

Follow me [![twitter](https://img.shields.io/twitter/follow/carlillo.svg?style=social&label=%20carlillo)](https://twitter.com/carlillo) to be notified about new releases.

25 lines (21 loc) 1.06 kB
import { Component, OnInit, Injector, ChangeDetectionStrategy } from "@angular/core"; import { InputBase } from "./input-base"; import { InlineTextConfig } from "../types/inline-configs"; @Component({ selector: "inline-editor-text", styleUrls: ["./input.component.css"], template: `<input #inputRef type="text" (keyup.enter)="onEnter($event)" (keyup.escape)="onEscape($event)" (focus)="onFocus($event)" (blur)="onBlur($event)" (click)="onClick($event)" (keypress)="onKeyPress($event)" class="form-control" [(ngModel)]="value" [required]="config.required" [disabled]="state.isDisabled()" [name]="config.name" [placeholder]="config.placeholder" [size]="config.size"/>`, changeDetection: ChangeDetectionStrategy.OnPush, }) export class InputTextComponent extends InputBase implements OnInit { constructor(injector: Injector) { super(injector); this.isRegexTestable = true; this.isLengthTestable = true; } public config: InlineTextConfig; }