Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Value accessors #6

Open
jaripekkala opened this issue Oct 15, 2019 · 0 comments
Open

Value accessors #6

jaripekkala opened this issue Oct 15, 2019 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@jaripekkala
Copy link
Member

final data = {
  'product': {
    'id': 2,
    'name': 'Foo',
  },
  'product_id': 2,
};

final form = FormGroup({
  'product_id': FormControl(data['product'], [Required()]),
});

assert(form.value != {'product_id': 2});

Use cases: autocompletes with initial value, single stored values controlled via multiple form controls (date & time fields separate however stored as datetimes)

@jaripekkala jaripekkala added the question Further information is requested label Oct 15, 2019
@jaripekkala jaripekkala added the enhancement New feature or request label Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant