Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ngonchanges hook inside formly #3913

Open
Swethasri1512 opened this issue May 11, 2024 · 0 comments
Open

Implement ngonchanges hook inside formly #3913

Swethasri1512 opened this issue May 11, 2024 · 0 comments

Comments

@Swethasri1512
Copy link

Swethasri1512 commented May 11, 2024

I am passing value of form elements disabled state as true or false from parent component.

So in child component I am using @input() disabled :Boolean

First load I am getting value from parent to child but I need to change this disabled state from true to false upon button click .,

Upon buton click the change in disabled state is passed from parent to child as
Parent component
<cm-child [disabled]="disabledstatus">

Child component
@input() disabled : string

This false state is not binding to form elements in ngxformly html elemnts but in child component ngonchanges lifecycle hook I can see disabled value updated once I click button

Is there any way that I can update form elements disabled state once the value is changed from parent component ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant