Repository URL to install this package:
|
Version:
2.5.2 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const exotic_1 = require("exotic");
const forms_1 = require("../../..");
const fixture_1 = require("./fixture");
class FormStateCard extends forms_1.FormState {
constructor() {
super(...arguments);
this.inputsList = fixture_1.inputList;
}
}
class Form extends forms_1.ObserverForm {
constructor(props) {
super(props);
this.isSubmitButtonNeeded = false;
this.state = new FormStateCard(props);
}
componentWillMount() {
const {
searchAdditionalProps
} = this.props;
const searchInputList = this.state.get('search');
if (exotic_1.isObj(searchAdditionalProps)) {
Object.keys(searchAdditionalProps).forEach(key => searchInputList[key] = searchAdditionalProps[key]);
}
}
}
Form.defaultProps = {
state: new FormStateCard()
};
exports.Form = Form;
exports.default = Form; //# sourceMappingURL=Form.js.map