@activatortube/react-native-form
Version:
react native form
39 lines (38 loc) • 1.33 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* Input 输入框组件
* 2019-09-06 22:40.
*
* @author WheelerLee https://github.com/WheelerLee
* @copyright 2019
*/
import React from 'react';
import { TextInput } from 'react-native';
import BaseFormItem from './BaseFormItem';
var Input = /** @class */ (function (_super) {
__extends(Input, _super);
function Input() {
return _super !== null && _super.apply(this, arguments) || this;
}
Input.prototype.render = function () {
var _this = this;
return (<TextInput {...this.props} onChangeText={function (text) {
_this.value = text;
_this.props.onChangeText && _this.props.onChangeText(text);
}}/>);
};
return Input;
}(BaseFormItem));
export default Input;