-
Notifications
You must be signed in to change notification settings - Fork 23
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 use ControlValueAccessor with Reactive forms generator? #168
Comments
Control value accessors are used to convert values from form state to control consumable format and back. |
Use .model getter to retrieve your model And then proceed with saving |
Control value accessors are used with fields, and not with generator |
@vasilich6107 reactive color picker was built to accept Color type and return Color type, what approach do you recommend if I want the color field to accept Color type and return int type or vice-versa? should I make my custom color picker from scratch? |
Color could be created from int and so you can retrieve int value from color when putting the item to database using |
I use freezed + reactive forms generator and I have this color picker field.
I'm struggling to integrate the ControlValueAccessor with my form management and database saving processes. Despite using reactive_forms_generator to generate form controls, I find it challenging to exert control over how values are handled, particularly with saving data to the database.
The text was updated successfully, but these errors were encountered: