hamzahamidi/ajsf

JsonSchemaFormService is a singleton instance. This prevents use the component more than once in an application

tproenca opened this issue · 2 comments

JsonSchemaFormService is a singleton instance. This prevents use the component more than once in an application since they shared the same state.

which template:

  • [X ] MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

JsonSchemaFormService is a singleton instance. This prevents use the component more than once in an application since they shared the same state.

To Reproduce
Create more than one component in a page with different schemas. Once you start typing in one component, it will mirror the state of the last component of the form.

Expected behavior
The components should work independently.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Log output covering before error and any error statements

Insert log hereCopy

Additional context
Add any other context about the problem here.

Detailed Description

Context

Possible Implementation

The fix is easy. I'm working on it and testing and as soon I have it done I'll push a pull request.