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

Knobs: Wrong component shown in basic code example for React Hook Form #6013

Closed
melloware opened this issue Feb 19, 2024 · 0 comments · Fixed by #6014
Closed

Knobs: Wrong component shown in basic code example for React Hook Form #6013

melloware opened this issue Feb 19, 2024 · 0 comments · Fixed by #6014
Assignees
Labels
Component: Documentation Issue or pull request is related to Documentation
Milestone

Comments

@melloware
Copy link
Member

Discussed in https://github.com/orgs/primefaces/discussions/1225

Originally posted by DavanaVM February 19, 2024
Hello, in the Code Example provided for React Hook Form it actually uses instead of a Knob, this issue is not in the full code example, only in the basic one.

Basic:

<Controller
    name="value"
    control={control}
    rules={{ required: 'The value must be greater than zero.' }}
    render={({ field }) => (
        <CascadeSelect id={field.name} name="value" value={field.value} options={countries} optionLabel={'cname'} optionGroupLabel={'name'}
         optionGroupChildren={['states', 'cities']} style={{ minWidth: '14rem' }} placeholder={'Select a City'}
         onChange={(e) => field.onChange(e.value)}/>)}
    />

Full Code example:

<Controller
   name="value"
   control={control}
   rules={{ required: 'The value must be greater than zero.' }}
   render={({ field }) => <Knob id={field.name} name="value" value={field.value || '0'} onChange={(e) => field.onChange(e.value)} />}
  />
```</div>
@melloware melloware transferred this issue from primefaces/community Feb 19, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 19, 2024
melloware added a commit to melloware/primereact that referenced this issue Feb 19, 2024
@melloware melloware added Component: Documentation Issue or pull request is related to Documentation and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 19, 2024
@melloware melloware self-assigned this Feb 19, 2024
@melloware melloware added this to the 10.5.2 milestone Feb 19, 2024
melloware added a commit that referenced this issue Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant