diff --git a/src/dialog-user/components/dialog-user/dialogUser.spec.ts b/src/dialog-user/components/dialog-user/dialogUser.spec.ts index 7b12e94aae..e470792dd5 100644 --- a/src/dialog-user/components/dialog-user/dialogUser.spec.ts +++ b/src/dialog-user/components/dialog-user/dialogUser.spec.ts @@ -224,7 +224,6 @@ describe('Dialog test', () => { read_only: 'new read_only', required: true, visible: false, - values: 'new values', default_value: 'new default_value' }; @@ -246,7 +245,7 @@ describe('Dialog test', () => { }); it('updates the field value', () => { - expect(dialogCtrl.dialogValues['service_name']).toBe('new values'); + expect(dialogCtrl.dialogValues['service_name']).toBe('new default_value'); }); it('updates properties of the field', () => { @@ -255,7 +254,6 @@ describe('Dialog test', () => { expect(dialogCtrl.dialogFields['service_name'].read_only).toBe('new read_only'); expect(dialogCtrl.dialogFields['service_name'].required).toBe(true); expect(dialogCtrl.dialogFields['service_name'].visible).toBe(false); - expect(dialogCtrl.dialogFields['service_name'].values).toBe('new values'); expect(dialogCtrl.dialogFields['service_name'].default_value).toBe('new default_value'); }); }); diff --git a/src/dialog-user/components/dialog-user/dialogUser.ts b/src/dialog-user/components/dialog-user/dialogUser.ts index d073be5dac..9cdf984efe 100644 --- a/src/dialog-user/components/dialog-user/dialogUser.ts +++ b/src/dialog-user/components/dialog-user/dialogUser.ts @@ -220,11 +220,8 @@ export class DialogUserController extends DialogClass implements IDialogs { private refreshFieldCallback(field, data) { this.dialogFields[field] = this.updateDialogFieldData(field, data); - if (this.isASortedItemDialogField(data.type)) { - this.dialogValues[field] = data.default_value; - } else { - this.dialogValues[field] = data.values; - } + + this.dialogValues[field] = data.default_value; this.dialogFields[field].fieldBeingRefreshed = false; this.saveDialogData(); @@ -238,18 +235,6 @@ export class DialogUserController extends DialogClass implements IDialogs { } } - /** - * Determines if the given field type is a subclass of DialogFieldSortedItem - * @memberof DialogUserController - * @function isASortedItemDialogField - * @param fieldType {string} This is the field type that should be used for comparison - */ - private isASortedItemDialogField(fieldType) { - return fieldType === 'DialogFieldDropDownList' || - fieldType === 'DialogFieldRadioButton' || - fieldType === 'DialogFieldTagControl'; - } - /** * Deals with updating select properties on a dialog field after the field has been refreshed * @memberof DialogUserController