feat(textarea): add textarea and interfaces for both inputs

This commit is contained in:
Brandy Carney
2017-08-08 17:05:04 -04:00
parent 487948eeb9
commit fe99d1958b
6 changed files with 567 additions and 207 deletions

View File

@ -0,0 +1,58 @@
// Shared Interfaces
import { EventEmitter } from '@stencil/core';
export interface InputBaseComponent {
ionStyle: EventEmitter;
ionBlur: EventEmitter;
ionFocus: EventEmitter;
clearOnEdit: boolean;
didBlurAfterEdit: boolean;
styleTmr: number;
// Shared Attributes
autocapitalize: string;
autocomplete: string;
autofocus: boolean;
disabled: boolean;
minlength: number;
maxlength: number;
name: string;
placeholder: string;
readonly: boolean;
required: boolean;
spellcheck: boolean;
value: string;
// Shared Methods
inputBlurred: (ev: any) => void;
inputChanged: (ev: any) => void;
inputFocused: (ev: any) => void;
inputKeydown: (ev: any) => void;
}
export interface InputComponent extends InputBaseComponent {
clearInput: boolean;
// Input Attributes
accept: string;
autocorrect: string;
inputmode: string;
min: string;
max: string;
multiple: boolean;
pattern: string;
results: number;
step: string;
size: number;
type: string;
}
export interface TextareaComponent extends InputBaseComponent {
// Textarea Attributes
cols: number;
rows: number;
wrap: string;
}

View File

@ -2,6 +2,7 @@ import { Component, Element, Event, EventEmitter, Prop, PropDidChange } from '@s
import { createThemedClasses } from '../../utils/theme';
import { InputComponent } from './input-base';
@Component({
tag: 'ion-input',
@ -14,11 +15,12 @@ import { createThemedClasses } from '../../utils/theme';
theme: 'input'
}
})
export class Input {
mode: any;
color: any;
styleTmr: any;
export class Input implements InputComponent {
mode: string;
color: string;
didBlurAfterEdit: boolean;
styleTmr: number;
@Element() el: HTMLElement;
@ -37,6 +39,16 @@ export class Input {
*/
@Event() ionFocus: EventEmitter;
/**
* @input {string} If the value of the type attribute is `"file"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.
*/
@Prop() accept: string;
/**
* @input {string} Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Defaults to `"none"`.
*/
@Prop() autocapitalize: string = 'none';
/**
* @input {string} Indicates whether the value of the control can be automatically completed by the browser. Defaults to `"off"`.
*/
@ -50,7 +62,7 @@ export class Input {
/**
* @input {string} This Boolean attribute lets you specify that a form control should have input focus when the page loads. Defaults to `false`.
*/
@Prop() autofocus: boolean;
@Prop() autofocus: boolean = false;
/**
* @input {boolean} If true and the type is `checkbox` or `radio`, the control is selected by default. Defaults to `false`.
@ -72,7 +84,7 @@ export class Input {
@Prop() clearInput: boolean = false;
/**
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types. Defaults to `false`.
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
*/
@Prop({ state: true }) clearOnEdit: boolean;
@ -90,14 +102,44 @@ export class Input {
}
/**
* @input {any} The minimum value, which must not be greater than its maximum (max attribute) value.
* @input {string} A hint to the browser for which keyboard to display. This attribute applies when the value of the type attribute is `"text"`, `"password"`, `"email"`, or `"url"`. Possible values are: `"verbatim"`, `"latin"`, `"latin-name"`, `"latin-prose"`, `"full-width-latin"`, `"kana"`, `"katakana"`, `"numeric"`, `"tel"`, `"email"`, `"url"`.
*/
@Prop() inputmode: string;
/**
* @input {string} The maximum value, which must not be less than its minimum (min attribute) value.
*/
@Prop() max: string;
/**
* @input {number} If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.
*/
@Prop() maxlength: number;
/**
* @input {string} The minimum value, which must not be greater than its maximum (max attribute) value.
*/
@Prop() min: string;
/**
* @input {any} The maximum value, which must not be less than its minimum (min attribute) value.
* @input {number} If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.
*/
@Prop() max: string;
@Prop() minlength: number;
/**
* @input {boolean} If true, the user can enter more than one value. This attribute applies when the type attribute is set to `"email"` or `"file"`, otherwise it is ignored.
*/
@Prop() multiple: boolean;
/**
* @input {string} The name of the control, which is submitted with the form data.
*/
@Prop() name: string;
/**
* @input {string} A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, or `"password"`, otherwise it is ignored.
*/
@Prop() pattern: string;
/**
* @input {string} Instructional text that shows before the input has a value.
@ -109,16 +151,31 @@ export class Input {
*/
@Prop() readonly: boolean = false;
/**
* @input {boolean} If true, the user must fill in a value before submitting a form.
*/
@Prop() required: boolean = false;
/**
* @input {number} This is a nonstandard attribute supported by Safari that only applies when the type is `"search"`. Its value should be a nonnegative decimal integer.
*/
@Prop() results: number;
/**
* @input {string} If true, the element will have its spelling and grammar checked. Defaults to `false`.
*/
@Prop() spellcheck: boolean = false;
/**
* @input {any} Works with the min and max attributes to limit the increments at which a value can be set.
* @input {string} Works with the min and max attributes to limit the increments at which a value can be set. Possible values are: `"any"` or a positive floating point number.
*/
@Prop() step: string;
/**
* @input {number} The initial size of the control. This value is in pixels unless the value of the type attribute is `"text"` or `"password"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, or `"password"`, otherwise it is ignored.
*/
@Prop() size: number;
/**
* @input {string} The type of control to display. The default type is text. Possible values are: `"text"`, `"password"`, `"email"`, `"number"`, `"search"`, `"tel"`, or `"url"`.
*/
@ -129,7 +186,6 @@ export class Input {
*/
@Prop({ state: true }) value: string;
ionViewDidLoad() {
this.emitStyle();
@ -155,13 +211,6 @@ export class Input {
});
}
/**
* @hidden
*/
hasValue(): boolean {
return (this.value !== null && this.value !== undefined && this.value !== '');
}
/**
* @hidden
@ -194,15 +243,6 @@ export class Input {
}
/**
* @hidden
*/
hasFocus(): boolean {
// check if an input has focus or not
return this.el && (this.el.querySelector(':focus') === this.el.querySelector('input'));
}
/**
* @hidden
*/
@ -241,7 +281,6 @@ export class Input {
this.didBlurAfterEdit = false;
}
/**
* @hidden
*/
@ -250,32 +289,52 @@ export class Input {
this.value = '';
}
/**
* @hidden
*/
hasFocus(): boolean {
// check if an input has focus or not
return this.el && (this.el.querySelector(':focus') === this.el.querySelector('input'));
}
/**
* @hidden
*/
hasValue(): boolean {
return (this.value !== null && this.value !== undefined && this.value !== '');
}
render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'text-input');
// TODO aria-labelledby={this.item.labelId}
// OLD RENDER
// '<input [(ngModel)]="_value" [type]="type" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" [disabled]="disabled" [readonly]="readonly" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type!==\'textarea\'" #input>' +
// '<textarea [(ngModel)]="_value" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" [placeholder]="placeholder" [disabled]="disabled" [readonly]="readonly" class="text-input" [ngClass]="\'text-input-\' + _mode" *ngIf="_type===\'textarea\'" #textarea></textarea>' +
// '<input [type]="type" aria-hidden="true" next-input *ngIf="_useAssist">' +
// '<ion-button clear [hidden]="!clearInput" type="button" class="text-input-clear-icon" (click)="clearTextInput()" (mousedown)="clearTextInput()"></ion-button>' +
// '<div (touchstart)="pointerStart($event)" (touchend)="pointerEnd($event)" (mousedown)="pointerStart($event)" (mouseup)="pointerEnd($event)" class="input-cover" tappable *ngIf="_useAssist"></div>',
return (
<input
aria-disabled={this.disabled ? 'true' : false}
accept={this.accept}
autoCapitalize={this.autocapitalize}
autoComplete={this.autocomplete}
autoCorrect={this.autocorrect}
autoFocus={this.autofocus}
checked={this.checked}
disabled={this.disabled}
inputMode={this.inputmode}
min={this.min}
max={this.max}
minLength={this.minlength}
maxLength={this.maxlength}
multiple={this.multiple}
name={this.name}
pattern={this.pattern}
placeholder={this.placeholder}
results={this.results}
readOnly={this.readonly}
required={this.required}
spellCheck={this.spellcheck}
step={this.step}
size={this.size}
type={this.type}
value={this.value}
class={themedClasses}

View File

@ -50,6 +50,11 @@
<ion-input id="dynamicReadonly" value="Readonly" readonly></ion-input>
</ion-item>
<ion-item>
<ion-label>Slot</ion-label>
<ion-input slot="start" value="Start"></ion-input>
</ion-item>
<ion-item>
<ion-label>Toggle</ion-label>
<ion-toggle checked slot="end"></ion-toggle>
@ -66,129 +71,6 @@
</ion-button>
</div>
<!--
<form>
<ion-list>
<ion-item>
<ion-label floating>Email</ion-label>
<ion-input clearInput id="login.email" name="email" type="email" required></ion-input>
</ion-item>
<ion-item>
<ion-label floating>Username</ion-label>
<ion-input clearInput id="login.username" name="username"></ion-input>
</ion-item>
<ion-item>
<ion-label>Password</ion-label>
<ion-input clearInput id="login.password" name="password" type="password" required></ion-input>
</ion-item>
<ion-item>
<ion-label>Comments</ion-label>
<ion-textarea clearInput id="login.comments" name="comments" required>Comment value</ion-textarea>
</ion-item>
<div padding-left padding-right>
<ion-button block onclick="submit($event, login)">Login</ion-button>
</div>
<div padding-left>
<b>Valid form?:</b> {{ mf.form.valid }}<br>
<b>Submitted form?:</b> {{ submitted }}<br>
<b>Email:</b> {{ login.email }}<br>
<b>Username:</b> {{ login.username }}<br>
<b>Password:</b> {{ login.password }}<br>
<b>Comments:</b> {{ login.comments }}
</div>
</ion-list>
</form>
<form>
<ion-list>
<ion-list-header>
Form w/ disabled inputs
</ion-list-header>
<ion-item>
<ion-label floating>Email</ion-label>
<ion-input type="email" name="email"></ion-input>
</ion-item>
<ion-item>
<ion-label floating>Username</ion-label>
<ion-input name="username"></ion-input>
</ion-item>
<ion-item>
<ion-label floating>Password</ion-label>
<ion-input type="password" name="password"></ion-input>
</ion-item>
<ion-item>
<ion-label floating>Comments</ion-label>
<ion-textarea name="comments"></ion-textarea>
</ion-item>
<div padding-left padding-right>
<ion-button block type="submit">Login</ion-button>
<ion-button block type="button" color="secondary" onclick="toggleDisable()">Disable (toggle)</ion-button>
</div>
<div padding-left>
<b>Valid form?:</b> {{ lf.form.valid }}<br>
<b>Submitted form?:</b> {{ submitted }}<br>
<b>Email:</b> {{ userForm.controls.email.value }}<br>
<b>Username:</b> {{ userForm.controls.username.value }}<br>
<b>Password:</b> {{ userForm.controls.password.value }}<br>
<b>Comments:</b> {{ userForm.controls.comments.value }}<br>
</div>
</ion-list>
</form>
<ion-list>
<ion-item>
<ion-label>Email</ion-label>
<ion-input type="email" required></ion-input>
</ion-item>
<ion-item>
<ion-label>Username</ion-label>
<ion-input></ion-input>
</ion-item>
<ion-item>
<ion-label>Password</ion-label>
<ion-input type="password" required></ion-input>
</ion-item>
<ion-item>
<ion-label>Comments</ion-label>
<ion-textarea required>Comment value</ion-textarea>
</ion-item>
</ion-list>
<ion-input placeholder="Stand-alone ion-input"></ion-input>
<ion-input placeholder="Stand-alone textarea"></ion-input>
<ion-list>
<ion-item>
<ion-label>Custom Attrs</ion-label>
<ion-input autocomplete="off"
spellcheck="false"
required
some-weird-attr="value"
accept="sure"
class="no-copy" id="no-copy" checked=checked
value="copy custom attributes"></ion-input>
</ion-item>
<ion-item>
<ion-label>Disabled Input</ion-label>
<ion-input disabled value="Value"></ion-input>
</ion-item>
<ion-item>
<ion-label>Disabled TextArea</ion-label>
<ion-textarea id="dynamicTextAreaDisabled" value="Value"></ion-textarea>
</ion-item>
</ion-list>
<ion-button onclick="disable()">Disable</ion-button> -->
</ion-content>
<script>
@ -197,7 +79,7 @@
var isTrue = ele[prop] ? false : true;
ele[prop] = isTrue;
console.log('in toggleBoolean, setting to', isTrue);
console.log('in toggleBoolean, setting', prop, 'to', isTrue);
}
</script>
</ion-app>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="UTF-8">
<title>Ionic Textareas</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script src="/dist/ionic.js"></script>
</head>
<body>
<ion-app>
<ion-header>
<ion-toolbar>
<ion-title>Textareas</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label color="primary">Inline Label</ion-label>
<ion-textarea placeholder="Textarea"></ion-textarea>
</ion-item>
<ion-item>
<ion-label color="primary" fixed>Fixed Label</ion-label>
<ion-textarea placeholder="Textarea"></ion-textarea>
</ion-item>
<ion-item>
<ion-textarea placeholder="Textarea with no label"></ion-textarea>
</ion-item>
<ion-item>
<ion-label color="primary" stacked>Stacked Label</ion-label>
<ion-textarea placeholder="Textarea"></ion-textarea>
</ion-item>
<ion-item>
<ion-label color="primary" floating>Floating Label</ion-label>
<ion-textarea></ion-textarea>
</ion-item>
<ion-item>
<ion-label>Disabled</ion-label>
<ion-textarea id="dynamicDisabled" value="Disabled" disabled></ion-textarea>
</ion-item>
<ion-item>
<ion-label>Readonly</ion-label>
<ion-textarea id="dynamicReadonly" value="Readonly" readonly></ion-textarea>
</ion-item>
<ion-item>
<ion-label color="primary">Clear on Edit</ion-label>
<ion-textarea clear-on-edit="true"></ion-textarea>
</ion-item>
<ion-item>
<ion-label color="primary">Clear on Edit</ion-label>
<ion-input clear-on-edit="true"></ion-input>
</ion-item>
</ion-list>
<div text-center>
<ion-button onclick="toggleBoolean('dynamicDisabled', 'disabled')">
Toggle Disabled
</ion-button>
<ion-button color="secondary" onclick="toggleBoolean('dynamicReadonly', 'readonly')">
Toggle Readonly
</ion-button>
</div>
</ion-content>
<script>
function toggleBoolean(id, prop) {
var ele = document.getElementById(id);
var isTrue = ele[prop] ? false : true;
ele[prop] = isTrue;
console.log('in toggleBoolean, setting', prop, 'to', isTrue);
}
</script>
</ion-app>
</body>
</html>

View File

@ -1,49 +1,321 @@
import { Component, Element, Event, EventEmitter, Prop, PropDidChange } from '@stencil/core';
// /**
// * @name TextArea
// * @description
// *
// * `ion-textarea` is used for multi-line text inputs. Ionic still
// * uses an actual `<textarea>` HTML element within the component;
// * however, with Ionic wrapping the native HTML text area element, Ionic
// * is able to better handle the user experience and interactivity.
// *
// * Note that `<ion-textarea>` must load its value from the `value` or
// * `[(ngModel)]` attribute. Unlike the native `<textarea>` element,
// * `<ion-textarea>` does not support loading its value from the
// * textarea's inner content.
// *
// * When requiring only a single-line text input, we recommend using
// * `<ion-input>` instead.
// *
// * @usage
// * ```html
// * <ion-item>
// * <ion-label>Comments</ion-label>
// * <ion-textarea></ion-textarea>
// * </ion-item>
// *
// * <ion-item>
// * <ion-label stacked>Message</ion-label>
// * <ion-textarea [(ngModel)]="msg"></ion-textarea>
// * </ion-item>
// *
// * <ion-item>
// * <ion-label floating>Description</ion-label>
// * <ion-textarea></ion-textarea>
// * </ion-item>
// *
// * <ion-item>
// * <ion-label>Long Description</ion-label>
// * <ion-textarea rows="6" placeholder="enter long description here..."></ion-textarea>
// * </ion-item>
// * ```
// *
// * @demo /docs/demos/src/textarea/
// */
import { createThemedClasses } from '../../utils/theme';
import { TextareaComponent } from './input-base';
// TODO textarea
// if (this.type === TEXTAREA) {
// item.setElementClass('item-textarea', true);
// }
/**
* @name TextArea
* @description
*
* `ion-textarea` is used for multi-line text inputs. Ionic still
* uses an actual `<textarea>` HTML element within the component;
* however, with Ionic wrapping the native HTML text area element, Ionic
* is able to better handle the user experience and interactivity.
*
* Note that `<ion-textarea>` must load its value from the `value` or
* `[(ngModel)]` attribute. Unlike the native `<textarea>` element,
* `<ion-textarea>` does not support loading its value from the
* textarea's inner content.
*
* When requiring only a single-line text input, we recommend using
* `<ion-input>` instead.
*
* @usage
* ```html
* <ion-item>
* <ion-label>Comments</ion-label>
* <ion-textarea></ion-textarea>
* </ion-item>
*
* <ion-item>
* <ion-label stacked>Message</ion-label>
* <ion-textarea [(ngModel)]="msg"></ion-textarea>
* </ion-item>
*
* <ion-item>
* <ion-label floating>Description</ion-label>
* <ion-textarea></ion-textarea>
* </ion-item>
*
* <ion-item>
* <ion-label>Long Description</ion-label>
* <ion-textarea rows="6" placeholder="enter long description here..."></ion-textarea>
* </ion-item>
* ```
*
* @demo /docs/demos/src/textarea/
*/
@Component({
tag: 'ion-textarea',
styleUrls: {
ios: 'input.ios.scss',
md: 'input.md.scss',
wp: 'input.wp.scss'
},
host: {
theme: 'input'
}
})
export class Textarea implements TextareaComponent {
mode: string;
color: string;
didBlurAfterEdit: boolean;
styleTmr: number;
@Element() el: HTMLElement;
/**
* @output {event} Emitted when the styles change.
*/
@Event() ionStyle: EventEmitter;
/**
* @output {event} Emitted when the input no longer has focus.
*/
@Event() ionBlur: EventEmitter;
/**
* @output {event} Emitted when the input has focus.
*/
@Event() ionFocus: EventEmitter;
/**
* @input {string} Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Defaults to `"none"`.
*/
@Prop() autocapitalize: string = 'none';
/**
* @input {string} Indicates whether the value of the control can be automatically completed by the browser. Defaults to `"off"`.
*/
@Prop() autocomplete: string = 'off';
/**
* @input {string} This Boolean attribute lets you specify that a form control should have input focus when the page loads. Defaults to `false`.
*/
@Prop() autofocus: boolean = false;
/**
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
*/
@Prop({ state: true }) clearOnEdit: boolean;
/**
* @input {boolean} If true, the user cannot interact with this element. Defaults to `false`.
*/
@Prop() disabled: boolean = false;
/**
* @hidden
*/
@PropDidChange('disabled')
setDisabled() {
this.emitStyle();
}
/**
* @input {number} If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.
*/
@Prop() maxlength: number;
/**
* @input {number} If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.
*/
@Prop() minlength: number;
/**
* @input {string} The name of the control, which is submitted with the form data.
*/
@Prop() name: string;
/**
* @input {string} Instructional text that shows before the input has a value.
*/
@Prop() placeholder: string;
/**
* @input {boolean} If true, the user cannot modify the value. Defaults to `false`.
*/
@Prop() readonly: boolean = false;
/**
* @input {boolean} If true, the user must fill in a value before submitting a form.
*/
@Prop() required: boolean = false;
/**
* @input {string} If true, the element will have its spelling and grammar checked. Defaults to `false`.
*/
@Prop() spellcheck: boolean = false;
/**
* @input {number} The visible width of the text control, in average character widths. If it is specified, it must be a positive integer.
*/
@Prop() cols: number;
/**
* @input {number} The number of visible text lines for the control.
*/
@Prop() rows: number;
/**
* @input {string} Indicates how the control wraps text. Possible values are: `"hard"`, `"soft"`, `"off"`.
*/
@Prop() wrap: string;
/**
* @input {string} The text value of the input.
*/
@Prop({ state: true }) value: string;
ionViewDidLoad() {
this.emitStyle();
}
private emitStyle() {
clearTimeout(this.styleTmr);
let styles = {
'textarea': true,
'input': true,
'input-disabled': this.disabled,
'input-has-value': this.hasValue(),
'input-has-focus': this.hasFocus()
};
this.styleTmr = setTimeout(() => {
this.ionStyle.emit(styles);
});
}
/**
* @hidden
*/
clearTextInput() {
console.debug('Should clear input', this.el);
this.value = '';
}
/**
* @hidden
*/
inputBlurred(ev: any) {
this.ionBlur.emit(ev);
this.focusChange(this.hasFocus());
this.emitStyle();
}
/**
* @hidden
*/
inputChanged(ev: any) {
this.value = ev.target && ev.target.value;
this.emitStyle();
}
/**
* @hidden
*/
inputFocused(ev: any) {
this.ionFocus.emit(ev);
this.focusChange(this.hasFocus());
this.emitStyle();
}
/**
* @hidden
*/
inputKeydown() {
this.checkClearOnEdit();
}
/**
* Check if we need to clear the text input if clearOnEdit is enabled
* @hidden
*/
checkClearOnEdit() {
if (!this.clearOnEdit) {
return;
}
// Did the input value change after it was blurred and edited?
if (this.didBlurAfterEdit && this.hasValue()) {
// Clear the input
this.clearTextInput();
}
// Reset the flag
this.didBlurAfterEdit = false;
}
/**
* @hidden
*/
focusChange(inputHasFocus: boolean) {
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
if (this.clearOnEdit && !inputHasFocus && this.hasValue()) {
this.didBlurAfterEdit = true;
}
}
/**
* @hidden
*/
hasFocus(): boolean {
// check if an input has focus or not
return this.el && (this.el.querySelector(':focus') === this.el.querySelector('textarea'));
}
/**
* @hidden
*/
hasValue(): boolean {
return (this.value !== null && this.value !== undefined && this.value !== '');
}
render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'text-input');
// TODO aria-labelledby={this.item.labelId}
return (
<textarea
autoCapitalize={this.autocapitalize}
// autoComplete={this.autocomplete}
autoFocus={this.autofocus}
disabled={this.disabled}
maxLength={this.maxlength}
minLength={this.minlength}
name={this.name}
placeholder={this.placeholder}
readOnly={this.readonly}
required={this.required}
spellCheck={this.spellcheck}
cols={this.cols}
rows={this.rows}
wrap={this.wrap}
class={themedClasses}
onBlur={this.inputBlurred.bind(this)}
onInput={this.inputChanged.bind(this)}
onFocus={this.inputFocused.bind(this)}
onKeyDown={this.inputKeydown.bind(this)}
>
{this.value}
</textarea>
)
}
}

View File

@ -14,7 +14,7 @@ exports.config = {
{ components: ['ion-gesture', 'ion-scroll'], priority: 'low' },
{ components: ['ion-grid', 'ion-row', 'ion-col'] },
{ components: ['ion-item', 'ion-item-divider', 'ion-item-sliding', 'ion-item-options', 'ion-item-option', 'ion-label', 'ion-list', 'ion-list-header', 'ion-skeleton-text'] },
{ components: ['ion-input'] },
{ components: ['ion-input', 'ion-textarea'] },
{ components: ['ion-loading', 'ion-loading-controller'] },
{ components: ['ion-menu'], priority: 'low' },
{ components: ['ion-modal', 'ion-modal-controller'] },