diff --git a/src/server/plugins/engine/components/ListFormComponent.ts b/src/server/plugins/engine/components/ListFormComponent.ts index 5488e84d4..5a387c2e8 100644 --- a/src/server/plugins/engine/components/ListFormComponent.ts +++ b/src/server/plugins/engine/components/ListFormComponent.ts @@ -125,6 +125,10 @@ export class ListFormComponent extends FormComponent { const selected = values.includes(item.value) const itemModel: ListItem = { ...item, selected } + if ('id' in itemModel) { + delete itemModel.id + } + if (item.description) { itemModel.hint = { text: item.description diff --git a/src/server/plugins/engine/pageControllers/QuestionPageController.test.ts b/src/server/plugins/engine/pageControllers/QuestionPageController.test.ts index 01bebf312..b0700587e 100644 --- a/src/server/plugins/engine/pageControllers/QuestionPageController.test.ts +++ b/src/server/plugins/engine/pageControllers/QuestionPageController.test.ts @@ -443,7 +443,6 @@ describe('QuestionPageController', () => { expect(filtered[1].model.label?.text).toBe('Select from the list') expect(filtered[1].model.items).toEqual([ { - id: expect.any(String), checked: false, condition: 'isBarnOwl', selected: false, @@ -451,7 +450,6 @@ describe('QuestionPageController', () => { value: '1' }, { - id: expect.any(String), checked: false, condition: 'isBarnOwl', selected: false, @@ -501,7 +499,6 @@ describe('QuestionPageController', () => { expect(filtered[1].model.label?.text).toBe('Select from the list') expect(filtered[1].model.items).toEqual([ { - id: expect.any(String), checked: false, condition: 'notBarnOwl', selected: false, @@ -509,7 +506,6 @@ describe('QuestionPageController', () => { value: '3' }, { - id: expect.any(String), checked: false, condition: 'notBarnOwl', selected: false,