You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe...
I have some fields where the default value or mutator depends on another value of the data passed in.
Describe the solution you'd like
I'd like to have that the parent record is passed into the functions
Describe alternatives you've considered
I'm not aware of any alternatives except for doing everything manually before creating/inserting the data.
Additional context
As an example, the make function could easily be adapted as such I think:
make(value: any, _parent: Record, key: string): any {
value = value !== undefined ? value : this.value
// Default Value might be a function (taking no parameter).
let localValue = value
if (typeof value === 'function') {
localValue = value(_parent) // Pass in _parent here
}
return this.mutate(localValue, key, _parent) // Pass in _parent here
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe...
I have some fields where the default value or mutator depends on another value of the data passed in.
Describe the solution you'd like
I'd like to have that the parent record is passed into the functions
Describe alternatives you've considered
I'm not aware of any alternatives except for doing everything manually before creating/inserting the data.
Additional context
As an example, the
make
function could easily be adapted as such I think:The text was updated successfully, but these errors were encountered: