Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

[BUG] nextPage event in wizard not working #157

Open
1 of 2 tasks
agoetschm opened this issue Nov 15, 2020 · 1 comment
Open
1 of 2 tasks

[BUG] nextPage event in wizard not working #157

agoetschm opened this issue Nov 15, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@agoetschm
Copy link

Environment

  • Hosting type
    • Form.io
    • Local deployment
      • Version: 1.30.0
  • Formio.js version: 4.10.3-rc.3
  • Frontend framework: angular 8.2.14

Steps to Reproduce

  1. clone the angular-material-formio demo
  2. replace the content of app.component.html with
<mat-formio [form]="form" [submission]="submission" (submit)="onSubmit($event)" (nextPage)="onNextPage()" (change)="onChange()"></mat-formio>
  1. edit the app.component.ts file to contain
form: any = {
  "type": "form",
  "components": [
    {
      "key": "panel",
      "title": "Part 1",
      "components": [
        {
          "label": "Foo",
          "key": "foo",
          "type": "textfield",
        }
      ],
      "type": "panel",
    },
    {
      "key": "panel2",
      "title": "Part 2",
      "components": [
        {
          "label": "Bar",
          "key": "bar",
          "type": "textfield",
        }
      ],
      "type": "panel",
    }
  ],
  "display": "wizard",
  "title": "Test wizard",
};
submission: any = {
  "data": {
    "foo": 5
  }
};

onChange() {
  console.log('onChange');
}

onNextPage() {
  console.log('nextPage');
}

Expected behavior

When clicking the "Next" button of the sample form, a log line with the text "nextPage" should be output in the console. The event is documented in the wiki.

Observed behavior

No log line, it looks like the event is not emitted by the mat-formio component.
The (change) event works well and the onChange log line appears.

I tried to use the non-material formio component with the angular-demo app and the event works there.

@agoetschm agoetschm added the bug Something isn't working label Nov 15, 2020
@agoetschm
Copy link
Author

I tried to find out where the issue lies:

My experience in debugging Angular apps is very limited, so if anyone has a hint on where to start I would be very thankful!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant