Coder Social home page Coder Social logo

Comments (12)

eesdil avatar eesdil commented on May 29, 2024 1

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.

ebrehault avatar ebrehault commented on May 29, 2024

Sure, the schema is just an attribute of the form component, you can change it whenever you want.

from ngx-schema-form.

sithwin avatar sithwin commented on May 29, 2024

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.

kianmeng-aft avatar kianmeng-aft commented on May 29, 2024

Hey , i am facing the same issue too.

Steps to reproduce,

  1. Clone the demo out https://github.com/fbessou/angular2-schema-form-demo
  2. Duplicate sampleschema.json to sampleschema.1.json and remove some fields
  3. Add a new button <button (click)="changeSchema()"> Change schema </button> in app.component.html
  4. 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.

kianmeng-aft avatar kianmeng-aft commented on May 29, 2024

any update on this?

from ngx-schema-form.

anna2102 avatar anna2102 commented on May 29, 2024

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.

SBats avatar SBats commented on May 29, 2024

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.

Valery-vs avatar Valery-vs commented on May 29, 2024

Hi
Any estimation for this issue? I am also facing the same issue.

from ngx-schema-form.

Valery-vs avatar Valery-vs commented on May 29, 2024

Or can I use early release to fix this problem?

from ngx-schema-form.

levequej avatar levequej commented on May 29, 2024

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.

ruben0909 avatar ruben0909 commented on May 29, 2024

+1

from ngx-schema-form.

fbessou avatar fbessou commented on May 29, 2024

Fixed by #86

from ngx-schema-form.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.