Repository URL to install this package:
|
Version:
3.0.4 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const isValid_1 = require("../../../deps/isValid");
const RadioGroup_1 = require("../../../../components/molecules/Toggle/RadioGroup");
const InputChain_1 = require("../../InputChain");
class RadioGroupInput extends InputChain_1.InputChain {
static isSatisfiedByProps(props) {
return props.type === 'radioGroup';
}
validate() {
console.log('RadioGroupInput_validate');
const value = this.getValue();
this.isValid = isValid_1.isValid(value, this.state.validationType);
}
render() {
const state = new RadioGroup_1.RadioGroupState(); // or props.radioGroupName
const props = this.store.get('props');
state.name = props.name; // @todo - should be done on willMount!!!!!!!!!!!!!!!!!!
// this.state = state
// this.state.__fixme = state
const {
radioInputsList
} = props;
console.log({
state,
radioInputsList
});
state.updateFrom(radioInputsList);
return react_1.default.createElement(RadioGroup_1.RadioGroup, {
state: state
});
}
}
exports.RadioGroupInput = RadioGroupInput;
exports.default = RadioGroupInput; //# sourceMappingURL=RadioGroupInput.js.map