Comments (12)
The change detection does not fire or the reference is not changing for the formProperty on the directive...
Any idea where is the issue?
from ngx-schema-form.
Sure, the schema is just an attribute of the form component, you can change it whenever you want.
from ngx-schema-form.
Currently, it is not dynamically changed.
Here is my dropdown list to load all the schema:
<select [(ngModel)]="selectedValue" class="form-control" name="contentType" id="contentType" (ngModelChange)="updateContent($event)" *ngIf="!isUpdate"> <option *ngFor="let contentType of contentTypeEntities" [ngValue]="contentType" > {{contentType.name}} </option> </select>
Here is my schema form table:
<table ngClass="jsonTable"> <tr> <td> <schema-form id="schemaForm" [model]="cmsContent.contentJson" [schema]="contentType.jsonSchema" (onChange)="value=($event.value)"> </schema-form> </td> </tr> </table>
Here is ts:
updateContent(selectedContenType: ContentTypeDto) { this.contentType = selectedContenType; }
I would like to dynamically change the schema form when the dropdown list is fired change event.
Pls advice what I am doing wrong. Thanks!
from ngx-schema-form.
Hey , i am facing the same issue too.
Steps to reproduce,
- Clone the demo out
https://github.com/fbessou/angular2-schema-form-demo
- Duplicate
sampleschema.json
tosampleschema.1.json
and remove some fields - Add a new button
<button (click)="changeSchema()"> Change schema </button>
inapp.component.html
- Add new method to change schema in
app.component.ts
changeSchema(){
this.schema = require("./sampleschema.1.json");
}
The final json generated on the right side, seems to change when the new button is clicked... but the UI does not change (Which is what i want)
Is it suppose to work this way? Because , i will have a couple of forms, and i want it to change it dynamically.
Thanks in advance!
from ngx-schema-form.
any update on this?
from ngx-schema-form.
Hi,
I am looking for the same solution to render UI immediately as soon as schema-form is updated? Is there any ways to do so? Thanks.
from ngx-schema-form.
Hi,
We have indeed an issue with changes propagation.
At the moment we're working on fixing AOT compatibility but this will be our next concern.
Sorry for the inconvenience!
from ngx-schema-form.
Hi
Any estimation for this issue? I am also facing the same issue.
from ngx-schema-form.
Or can I use early release to fix this problem?
from ngx-schema-form.
same issue here (in my case I want to achieve what is mentionnent in #49) , even the example in https://github.com/makinacorpus/angular2-schema-form#fixing-the-schema-or-model-before-rendering does not work for me with angular 2.3.1 using angular-cli": 1.0.0-beta.26 and angular2-schema-form 1.0.0-alpha.33 . It seems to worknig only when providing a static JSON
from ngx-schema-form.
+1
from ngx-schema-form.
Fixed by #86
from ngx-schema-form.
Related Issues (20)
- Could not resolve dependency - peer @angular/common@"^11.2.6" from [email protected]
- Parent container for all the form actions HOT 3
- [Bug]: Type mismatch with sf-form component input HOT 1
- Regression loading array data with v 2.7.0
- Visible If not working if value is [0] HOT 3
- Add support for Angular 14 HOT 2
- when adding my angular 14.0.6 project > npm install ngx-schema-form --save HOT 4
- "visibleIf" with nothing vs. "oneOf"
- Support for draft 2020-12 array syntax
- are dependent fields in JSON schema supported ? HOT 2
- visibilityIf no longer works when target is multiple Select widget HOT 2
- Type 'string' is not assignable to type 'TSchemaPropertyType | undefined' HOT 1
- Add support for Angular 15 HOT 3
- Compatibility issue with Angular version 8.2 HOT 5
- Large number input fields behaving oddly HOT 2
- Compatibility with angular 16 HOT 3
- ESM imports not working HOT 1
- undefined type "undefined" error for a valid schema HOT 1
- Issue with visibleIf in array items HOT 4
- upgrade to Angular 17 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-schema-form.