Skip to content

Commit

Permalink
Other cleanup changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Feb 15, 2018
1 parent df3d136 commit 879cee9
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 26 deletions.
8 changes: 4 additions & 4 deletions dist/formio.embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -8151,7 +8151,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down Expand Up @@ -9568,7 +9567,7 @@ var SelectComponent = exports.SelectComponent = function (_BaseComponent) {
} else {
var values = [];
_lodash2.default.each(this.selectOptions, function (selectOption) {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down Expand Up @@ -11795,6 +11794,7 @@ var FormioForm = function (_FormioComponents) {

return this.onElement.then(function () {
_this9.clear();
_this9.showElement(false);
return _this9.localize().then(function () {
_this9.build();
_this9.isBuilt = true;
Expand All @@ -11806,7 +11806,8 @@ var FormioForm = function (_FormioComponents) {
return _this9.updateValue();
});
setTimeout(function () {
return _this9.emit('render');
_this9.onChange();
_this9.emit('render');
}, 1);
});
});
Expand Down Expand Up @@ -14002,7 +14003,6 @@ var FormioPDF = function (_FormioForm) {
});
this.appendChild(this.element, this.submitButton);
}
this.triggerChange();
}
}]);

Expand Down
2 changes: 1 addition & 1 deletion dist/formio.embed.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/formio.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -8151,7 +8151,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down Expand Up @@ -9568,7 +9567,7 @@ var SelectComponent = exports.SelectComponent = function (_BaseComponent) {
} else {
var values = [];
_lodash2.default.each(this.selectOptions, function (selectOption) {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down Expand Up @@ -11661,6 +11660,7 @@ var FormioForm = function (_FormioComponents) {

return this.onElement.then(function () {
_this9.clear();
_this9.showElement(false);
return _this9.localize().then(function () {
_this9.build();
_this9.isBuilt = true;
Expand All @@ -11672,7 +11672,8 @@ var FormioForm = function (_FormioComponents) {
return _this9.updateValue();
});
setTimeout(function () {
return _this9.emit('render');
_this9.onChange();
_this9.emit('render');
}, 1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion dist/formio.form.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/formio.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -8151,7 +8151,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down Expand Up @@ -9568,7 +9567,7 @@ var SelectComponent = exports.SelectComponent = function (_BaseComponent) {
} else {
var values = [];
_lodash2.default.each(this.selectOptions, function (selectOption) {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down Expand Up @@ -11753,6 +11752,7 @@ var FormioForm = function (_FormioComponents) {

return this.onElement.then(function () {
_this9.clear();
_this9.showElement(false);
return _this9.localize().then(function () {
_this9.build();
_this9.isBuilt = true;
Expand All @@ -11764,7 +11764,8 @@ var FormioForm = function (_FormioComponents) {
return _this9.updateValue();
});
setTimeout(function () {
return _this9.emit('render');
_this9.onChange();
_this9.emit('render');
}, 1);
});
});
Expand Down Expand Up @@ -13960,7 +13961,6 @@ var FormioPDF = function (_FormioForm) {
});
this.appendChild(this.element, this.submitButton);
}
this.triggerChange();
}
}]);

Expand Down
2 changes: 1 addition & 1 deletion dist/formio.full.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/formio.wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8151,7 +8151,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down Expand Up @@ -9568,7 +9567,7 @@ var SelectComponent = exports.SelectComponent = function (_BaseComponent) {
} else {
var values = [];
_lodash2.default.each(this.selectOptions, function (selectOption) {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down Expand Up @@ -11661,6 +11660,7 @@ var FormioForm = function (_FormioComponents) {

return this.onElement.then(function () {
_this9.clear();
_this9.showElement(false);
return _this9.localize().then(function () {
_this9.build();
_this9.isBuilt = true;
Expand All @@ -11672,7 +11672,8 @@ var FormioForm = function (_FormioComponents) {
return _this9.updateValue();
});
setTimeout(function () {
return _this9.emit('render');
_this9.onChange();
_this9.emit('render');
}, 1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion dist/formio.wizard.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion lib/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down
2 changes: 1 addition & 1 deletion lib/components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ var SelectComponent = exports.SelectComponent = function (_BaseComponent) {
} else {
var values = [];
_lodash2.default.each(this.selectOptions, function (selectOption) {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down
4 changes: 3 additions & 1 deletion lib/formio.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ var FormioForm = function (_FormioComponents) {

return this.onElement.then(function () {
_this9.clear();
_this9.showElement(false);
return _this9.localize().then(function () {
_this9.build();
_this9.isBuilt = true;
Expand All @@ -696,7 +697,8 @@ var FormioForm = function (_FormioComponents) {
return _this9.updateValue();
});
setTimeout(function () {
return _this9.emit('render');
_this9.onChange();
_this9.emit('render');
}, 1);
});
});
Expand Down
1 change: 0 additions & 1 deletion lib/formio.pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ var FormioPDF = function (_FormioForm) {
});
this.appendChild(this.element, this.submitButton);
}
this.triggerChange();
}
}]);

Expand Down
1 change: 0 additions & 1 deletion src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ module.exports = {
}
if (!nobuild) {
comp.build();
comp.triggerChange();
comp.isBuilt = true;
}
return comp;
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ export class SelectComponent extends BaseComponent {
else {
const values = [];
_.each(this.selectOptions, (selectOption) => {
if (selectOption.element.selected) {
if (selectOption.element && selectOption.element.selected) {
values.push(selectOption.value);
}
});
Expand Down
6 changes: 5 additions & 1 deletion src/formio.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,17 @@ export default class FormioForm extends FormioComponents {
render() {
return this.onElement.then(() => {
this.clear();
this.showElement(false);
return this.localize().then(() => {
this.build();
this.isBuilt = true;
this.onResize();
this.on('resetForm', () => this.reset(), true);
this.on('refreshData', () => this.updateValue());
setTimeout(() => this.emit('render'), 1);
setTimeout(() => {
this.onChange();
this.emit('render');
}, 1);
});
});
}
Expand Down
1 change: 0 additions & 1 deletion src/formio.pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export default class FormioPDF extends FormioForm {
});
this.appendChild(this.element, this.submitButton);
}
this.triggerChange();
}
}

Expand Down

0 comments on commit 879cee9

Please sign in to comment.