rerobe-js-orm 2.9.3 → 2.9.4

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.
@@ -7,5 +7,6 @@ export default abstract class FormState extends Base {
7
7
  multiSelectChangeHandler<T>(key: keyof FormStateObject, value: T): void;
8
8
  multiSelectMediaChangeHandler(key: keyof FormStateObject, fileArr: FileObj[]): void;
9
9
  onAddNewOptionToFormFieldOptions(key: keyof FormStateObject, option: FormFieldOption): void;
10
+ onSetNewFormFieldOptions(key: keyof FormStateObject, options: FormFieldOption[]): void;
10
11
  editExistingOption(key: keyof FormStateObject, oldOptionValue: string, option: FormFieldOption): void;
11
12
  }
@@ -38,6 +38,11 @@ class FormState extends Base_1.default {
38
38
  }
39
39
  }
40
40
  }
41
+ onSetNewFormFieldOptions(key, options) {
42
+ const formField = this.fields[key];
43
+ const newOptions = this.utilities.uniqObjArray(options, 'value');
44
+ formField.options = newOptions;
45
+ }
41
46
  editExistingOption(key, oldOptionValue, option) {
42
47
  const formField = this.fields[key];
43
48
  const existingOptionIndex = formField.options && formField.options.findIndex((opt) => opt.value === oldOptionValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.9.3",
3
+ "version": "2.9.4",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",