tuain-form-manager 1.1.22 → 1.1.23

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.
Files changed (2) hide show
  1. package/lib/form.js +2 -2
  2. package/package.json +1 -1
package/lib/form.js CHANGED
@@ -426,7 +426,7 @@ class Form {
426
426
  }
427
427
  }
428
428
 
429
- setFieldOptions(code, options, idField, valueField) {
429
+ setFieldOptions(code, options, idField, valueField, saparator = '-') {
430
430
  const fieldObject = this.getField(code);
431
431
  if (!fieldObject) { return; }
432
432
  fieldObject.fieldOptions = [];
@@ -434,7 +434,7 @@ class Form {
434
434
  const optionObj = options[i];
435
435
  const fieldOptionId = optionObj?.[idField];
436
436
  const fieldOptionValue = Array.isArray(valueField)
437
- ? valueField.reduce((acum, valFld) => `${acum}${optionObj?.[valFld] ?? ''} `, '')
437
+ ? valueField.reduce((acum, valFld) => `${acum}${optionObj?.[valFld] ?? ''}${saparator}`, '')
438
438
  : optionObj?.[valueField] ?? null;
439
439
  if (fieldOptionId && fieldOptionValue) {
440
440
  fieldObject.fieldOptions.push({ fieldOptionId, fieldOptionValue });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-form-manager",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "description": "Component library to perform operations on Tuain Development Framework forms to interchange information on web or mobile applications based on the data interchange of abstract forms making trnasformation on the data upon actions required on both sides (front and back)",
5
5
  "main": "index.js",
6
6
  "scripts": {