diff --git a/app/components/forms/wizard/attendee-step.js b/app/components/forms/wizard/attendee-step.js index 3ae60ffc696..ec75b398bb4 100644 --- a/app/components/forms/wizard/attendee-step.js +++ b/app/components/forms/wizard/attendee-step.js @@ -17,5 +17,12 @@ export default Component.extend(FormMixin, EventWizardMixin, { showEditColumn: computed('editableFields.@each', function() { return this.editableFields?.some(field => field.isComplex); - }) + }), + + actions: { + removeField(field) { + this.data.customForms.removeObject(field); + } + } }); + diff --git a/app/components/forms/wizard/custom-forms/table.hbs b/app/components/forms/wizard/custom-forms/table.hbs index 5cc36f41959..9645cd417e0 100644 --- a/app/components/forms/wizard/custom-forms/table.hbs +++ b/app/components/forms/wizard/custom-forms/table.hbs @@ -71,8 +71,7 @@ - {{!-- Hiding till implemented --}} - {{/if}} diff --git a/app/components/forms/wizard/custom-forms/table.ts b/app/components/forms/wizard/custom-forms/table.ts index 90119ab5bad..c6c7fc8b495 100644 --- a/app/components/forms/wizard/custom-forms/table.ts +++ b/app/components/forms/wizard/custom-forms/table.ts @@ -1,12 +1,12 @@ import Component from '@glimmer/component'; - interface CustomForm { isComplex: boolean } interface Args { fields: CustomForm[], - updateField: (field: CustomForm) => void -} + removeField: (field: any) => void, + updateField: (field: any) => void + } export default class CustomFormTable extends Component { get editColumn(): boolean { diff --git a/app/templates/components/forms/wizard/attendee-step.hbs b/app/templates/components/forms/wizard/attendee-step.hbs index 55be31bb571..b0f1f795388 100644 --- a/app/templates/components/forms/wizard/attendee-step.hbs +++ b/app/templates/components/forms/wizard/attendee-step.hbs @@ -49,7 +49,9 @@
+ @removeField={{action "removeField"}} + @updateField={{action (mut this.field)}} + />