Skip to content
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

feat(form): add setValue method to FormGroup class #175

Closed
ayoayco opened this issue Nov 4, 2022 · 2 comments · Fixed by #191
Closed

feat(form): add setValue method to FormGroup class #175

ayoayco opened this issue Nov 4, 2022 · 2 comments · Fixed by #191
Assignees

Comments

@ayoayco
Copy link
Member

ayoayco commented Nov 4, 2022

✨ Desired outcome: a new setValue method in the FormGroup class that allows setting the values of the form controls given an argument with the following shape:

type ValueParam = Record<string, ValueType>; // where ValueType (doesn't exist yet) is the acceptable values for all FormControl types

// for example
const values = {
  userName: 'value',
  email: 'invalid-email'
}

// then using setValue
form.setValue(values)

// ... will call control.setValue if the key matches the name of the control
@NeilAn99
Copy link
Contributor

Hey, I would like to try working on this.

@ayoayco
Copy link
Member Author

ayoayco commented Nov 12, 2022

Thank you, @NeilAn99! I have reviewed your PR :)

@ayoayco ayoayco moved this to In Progress in Astro Reactive v1.0.0 ✨ Nov 12, 2022
Repository owner moved this from In Progress to Done in Astro Reactive v1.0.0 ✨ Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants