Repository URL to install this package:
|
Version:
0.9.5 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const SelectDropDown_1 = __importDefault(require("molecules/SelectDropDown"));
const InputChain_1 = require("../../InputChain");
class SelectBoxInput extends InputChain_1.InputChain {
constructor() {
super(...arguments);
this.handleDropDownChange = args => {
const state = this.get('state');
console.info('[Forms/SelectDropdown] handleDropdownChange()', args);
state.setValue(args);
};
}
static isSatisfiedByProps(props) {
return props.type === 'select';
}
render() {
const props = this.get('props');
const attributes = Object.assign({}, props, { onChange: this.handleDropDownChange });
console.debug('SelectBoxInput');
console.info(props);
return react_1.default.createElement(SelectDropDown_1.default, Object.assign({}, attributes));
}
}
exports.SelectBoxInput = SelectBoxInput;
exports.default = SelectBoxInput;
//# sourceMappingURL=SelectBoxInput.js.map