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

Checkbox: Component fail to render when using the state on pt property #6291

Closed
LeandroMarcondes opened this issue Apr 2, 2024 · 0 comments · Fixed by #6679 or leoo1992/GeradorQRCode#57 · May be fixed by nhattpn/BTL_LTNC#56
Closed
Assignees
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component Type: Bug Issue contains a defect related to a specific component.

Comments

@LeandroMarcondes
Copy link
Contributor

Describe the bug

The component fail to render and raise an exception that broke the page when the property "pt" has any state related.

It can also be observed when go to the documentation https://primereact.org/checkbox/ and click into the "PASS THROUGH" tab.

The sample below was working on version 10.5.1, but not working on 10.5.2 or 10.6.2 :

pt={{
            input: ({ state }) => ({
              className:
                state.focused && ingredients.includes('Cheese') !== null
                  ? 'border-3 border-orange-500'
                  : 'border-3 border-blue-500',
            }),
          }}

Reproducer

https://stackblitz.com/edit/964dj2?file=src%2FApp.jsx

PrimeReact version

10.5.2

React version

18.x

Language

ALL

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to Documentation https://primereact.org/checkbox/
  2. Click into the tab "PASS THROUGH"

Expected behavior

No response

@LeandroMarcondes LeandroMarcondes added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 2, 2024
@nitrogenous nitrogenous self-assigned this Apr 3, 2024
@nitrogenous nitrogenous added Type: Bug Issue contains a defect related to a specific component. Type: Breaking Change Issue contains a breaking change related to a specific component and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 3, 2024
nitrogenous added a commit that referenced this issue Jul 3, 2024
Fix #6291 Checkbox: Component fail to render when
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
2 participants