@chatterton/angular2-schema-form
Version:
Angular2 Schema Form (DISCLAIMER: it is not related to angular-schema-form)
19 lines (15 loc) • 480 B
text/typescript
import { Component } from '@angular/core';
import { ControlWidget } from '../../widget';
export class StringWidget extends ControlWidget {
getInputType() {
if (!this.schema.widget.id || this.schema.widget.id === 'string' || this.schema.widget.id === 'auto-complete') {
return 'text';
} else {
return this.schema.widget.id;
}
}
}