formio / vue

Javascript Powered forms and JSON form builder for Vue.js
MIT License
119 stars 65 forks source link

[BUG] Formbuilder triggers change event twice #51

Closed Sefriol closed 8 months ago

Sefriol commented 3 years ago

Environment

Please provide as many details as you can:

Steps to Reproduce

  1. Install vue-formio
  2. Open Formbuilder
  3. Add a component and save

Expected behavior

Change event should only trigger once

Observed behavior

It triggers twice

Example

It seem that there is already a component in formio that emits change event after component has been removed, updated or saved.

After emitting a change event in:

https://github.com/formio/vue-formio/blob/master/src/components/FormBuilder.ts#L67

there comes a second event change that is emitted in:

https://github.com/formio/vue-formio/blob/master/src/components/FormBuilder.ts#L62

Even if the line FormBuilder.ts#L67 is commented out, the event will still occur. So, is emitting this event separately necessary?

Sefriol commented 3 years ago

Workaround for a moment: Just track removeComponent, saveComponent instead.

EDIT: and addComponent

jeriah-formio commented 8 months ago

We're currently addressing a backlog of GitHub issues. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!