diff --git a/packages/form-js-editor/test/spec/core/FieldFactory.spec.js b/packages/form-js-editor/test/spec/core/FieldFactory.spec.js index 13acf42f9..c125aec2e 100644 --- a/packages/form-js-editor/test/spec/core/FieldFactory.spec.js +++ b/packages/form-js-editor/test/spec/core/FieldFactory.spec.js @@ -310,12 +310,12 @@ describe('core/FieldFactory', function () { // helpers ////////////// -function testCreate(options, isNew = true) { +function testCreate(options, isNewField = true) { const { type, label, keyed = false, initial = {}, expected = {} } = options; return inject(function (fieldFactory) { // when - const field = fieldFactory.create({ type, ...initial }, isNew); + const field = fieldFactory.create({ type, ...initial }, isNewField); // then expect(field.id).to.exist; diff --git a/packages/form-js-viewer/src/core/FieldFactory.js b/packages/form-js-viewer/src/core/FieldFactory.js index 09fc99660..9f4dd2dc3 100644 --- a/packages/form-js-viewer/src/core/FieldFactory.js +++ b/packages/form-js-viewer/src/core/FieldFactory.js @@ -13,7 +13,7 @@ export class FieldFactory { this._formFields = formFields; } - create(attrs, isNew = true) { + create(attrs, isNewField = true) { const { id, type, key, path, _parent } = attrs; const fieldDefinition = this._formFields.get(type); @@ -65,7 +65,7 @@ export class FieldFactory { ...(config.label ? { label: config.label } : {}), ...attrs, }, - isNew, + isNewField, ); this._ensureId(field); diff --git a/packages/form-js-viewer/src/render/components/form-fields/Datetime.js b/packages/form-js-viewer/src/render/components/form-fields/Datetime.js index dc619a157..a34b1ade9 100644 --- a/packages/form-js-viewer/src/render/components/form-fields/Datetime.js +++ b/packages/form-js-viewer/src/render/components/form-fields/Datetime.js @@ -214,11 +214,11 @@ Datetime.config = { group: 'basic-input', emptyValue: null, sanitizeValue: sanitizeDateTimePickerValue, - create: (options = {}, isNew) => { + create: (options = {}, isNewField) => { const defaults = {}; set(defaults, DATETIME_SUBTYPE_PATH, DATETIME_SUBTYPES.DATE); - if (isNew) { + if (isNewField) { set(defaults, DATE_LABEL_PATH, 'Date'); }