-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Dynamic options inside object arrays #585
Comments
I think something like this can be added, but still need to think a bit on how best to do it. |
+1 on reactive way to grab other field values in an array of objects and dynamically set autoform.options. Thanks @craig-l for the suggestion. I'll give it a shot. |
This worked for trying to set options, but not when trying to use the getRelativeFieldValue function in an autoValue function. Looks like I might want to try a custom template like noted on #202... would be nice to keep all the settings in the schema. |
I just tried, but no luck. I actually don't see my autovalue function getting called at all. Hmmm ~Brad
|
Ah it's waiting for an insert/update I believe. I'm looking to try and have default values populate as you fill the form, but can still change them. Maybe autovalue is the wrong place to do this. ~Brad
|
In autoform 5.0, var model = AutoForm.getFieldValue(this.name.replace('.color', '.model')); We can continue to think of how this might be made easier, but it's a bit better anyway. |
Related to #553, except we are doing this inside an array.
We're generating dynamic options inside autoform.options as follows
This works and the select options are reactive, even when inside a deeply embedded array and looking somewhere other than a sibling.
Related to #584.. this.field('selectedCars.$.model') would be helpful/more slick
We made
getRelativeFieldValue
like soThe text was updated successfully, but these errors were encountered: