Skip to content

feat: includes an afterChange function to FormSelect #33

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

Merged
merged 7 commits into from
Oct 9, 2020

Conversation

joaoassisb
Copy link
Contributor

No description provided.

@joaoassisb joaoassisb marked this pull request as draft October 8, 2020 12:45
João Vitor added 3 commits October 8, 2020 09:47
@joaoassisb joaoassisb marked this pull request as ready for review October 8, 2020 12:56
@joaoassisb joaoassisb requested a review from assisrafael October 8, 2020 14:44
import { FormContext } from './form-helpers';
import { toDatetimeLocal, fromDatetimeLocal } from '../../utils/formatters';

export function useFormControl(name, type) {
export function useFormControl(name, type, hooks) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is missing a default value to the hooks argument.

const formState = useContext(FormContext);

const { afterChange } = hooks;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this destructuring and use the object directly on the code below.

@joaoassisb joaoassisb requested a review from assisrafael October 9, 2020 10:14
@assisrafael assisrafael merged commit 3b6f13f into assisrafael:master Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants