Repository URL to install this package:
|
Version:
2.1.2-perf.5 ▾
|
import React from 'react';
import { isValid } from "../../../../../forms/deps/isValid";
import { RadioGroup, RadioGroupState } from "../../../../../components/molecules/Toggle/RadioGroup";
import { InputChain } from "../../InputChain";
class RadioGroupInput extends InputChain {
static isSatisfiedByProps(props) {
return props.type === 'radioGroup';
}
validate() {
console.log('RadioGroupInput_validate');
const value = this.getValue();
this.isValid = isValid(value, this.state.validationType);
}
render() {
const state = new 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.createElement(RadioGroup, {
state: state
});
}
}
export { RadioGroupInput };
export default RadioGroupInput; //# sourceMappingURL=RadioGroupInput.js.map