-
Notifications
You must be signed in to change notification settings - Fork 177
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
how to set values based on another input field? #63
Comments
is any process regarding this bug ? |
I want to achieve something similar functionality. @dschnelldavis mentioned about 2-way data binding but it doesn't seem to be working. My schema,
In my layout, I have created a widget called message where I want to write
So, the way it should work is, I should get realtime 'eventCacheMemorySizeMB' and calculate number of events it can accommodate. Not sure how to achieve this, really stuck. I know, it will not work at the moment because 'eventCacheMemorySizeMB' is not a variable/constant in my layout, rather it is just a key of my schema. I just wrote it for Illustration purpose to visualise the end result. I tried creating a constant in my layout and passing relatime data object to it, so that I could use,
This get the value on initiating an object of the component. But it doesn't bind the value on change (2-way binding). Secondly, I tried wrting onChange function and passed it to json-schema-form HTML file,
Inside component,
This will reinitialise the whole form onChnage with an updated object. However, user will loose focus on each change which is totally not an ideal scenario. |
How to set values based on anther input field. I have 3 input fields respectively totalAmount, advance, balance. Here user will provide totalAmount and Advance. Based on this input i want to calculate remaining balance.
I don't know how to achieve this using angular2-json-schema-form.
I tried below form but working.
The text was updated successfully, but these errors were encountered: