@formio/js 5.0.0-dev.5896.56bf2bd → 5.0.0-dev.5898.ffba52a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -342,8 +342,9 @@ class RadioComponent extends ListComponent_1.default {
342
342
  label: this.component.valueProperty ? this.itemTemplate(item, valueAtProperty) : this.itemTemplate(item, item, i)
343
343
  };
344
344
  listData.push(this.templateData[this.component.valueProperty ? valueAtProperty : i]);
345
- const value = this.loadedOptions[i].value;
346
- if (!this.isRadio && (lodash_1.default.isObject(value) || lodash_1.default.isBoolean(value) || lodash_1.default.isUndefined(value))) {
345
+ if ((this.component.valueProperty || !this.isRadio) && (lodash_1.default.isUndefined(valueAtProperty) ||
346
+ (!this.isRadio && lodash_1.default.isObject(valueAtProperty)) ||
347
+ (!this.isRadio && lodash_1.default.isBoolean(valueAtProperty)))) {
347
348
  this.loadedOptions[i].invalid = true;
348
349
  }
349
350
  });
@@ -295,12 +295,12 @@ exports.checkSimpleConditional = checkSimpleConditional;
295
295
  */
296
296
  function getComponentActualValue(compPath, data, row) {
297
297
  let value = null;
298
- if (row) {
299
- value = (0, formUtils_1.getValue)({ data: row }, compPath);
300
- }
301
- if (data && lodash_1.default.isNil(value)) {
298
+ if (data) {
302
299
  value = (0, formUtils_1.getValue)({ data }, compPath);
303
300
  }
301
+ if (row && lodash_1.default.isNil(value)) {
302
+ value = (0, formUtils_1.getValue)({ data: row }, compPath);
303
+ }
304
304
  // FOR-400 - Fix issue where falsey values were being evaluated as show=true
305
305
  if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {
306
306
  value = '';
@@ -342,8 +342,9 @@ export default class RadioComponent extends ListComponent {
342
342
  label: this.component.valueProperty ? this.itemTemplate(item, valueAtProperty) : this.itemTemplate(item, item, i)
343
343
  };
344
344
  listData.push(this.templateData[this.component.valueProperty ? valueAtProperty : i]);
345
- const value = this.loadedOptions[i].value;
346
- if (!this.isRadio && (_.isObject(value) || _.isBoolean(value) || _.isUndefined(value))) {
345
+ if ((this.component.valueProperty || !this.isRadio) && (_.isUndefined(valueAtProperty) ||
346
+ (!this.isRadio && _.isObject(valueAtProperty)) ||
347
+ (!this.isRadio && _.isBoolean(valueAtProperty)))) {
347
348
  this.loadedOptions[i].invalid = true;
348
349
  }
349
350
  });
@@ -259,12 +259,12 @@ export function checkSimpleConditional(component, condition, row, data, instance
259
259
  */
260
260
  export function getComponentActualValue(compPath, data, row) {
261
261
  let value = null;
262
- if (row) {
263
- value = getValue({ data: row }, compPath);
264
- }
265
- if (data && _.isNil(value)) {
262
+ if (data) {
266
263
  value = getValue({ data }, compPath);
267
264
  }
265
+ if (row && _.isNil(value)) {
266
+ value = getValue({ data: row }, compPath);
267
+ }
268
268
  // FOR-400 - Fix issue where falsey values were being evaluated as show=true
269
269
  if (_.isNil(value) || (_.isObject(value) && _.isEmpty(value))) {
270
270
  value = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5896.56bf2bd",
3
+ "version": "5.0.0-dev.5898.ffba52a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {