Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / module / forms / input / plugins / Special / RadioGroupInput.js
Size: Mime:
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