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

Inplace: active prop does not work #6940

Closed
Vilican opened this issue Jul 27, 2024 · 2 comments · Fixed by #6959 or leoo1992/GeradorQRCode#85 · May be fixed by mtech-31-quemistry/quemistry_client_web#20
Closed

Inplace: active prop does not work #6940

Vilican opened this issue Jul 27, 2024 · 2 comments · Fixed by #6959 or leoo1992/GeradorQRCode#85 · May be fixed by mtech-31-quemistry/quemistry_client_web#20
Assignees
Labels
Component: Documentation Issue or pull request is related to Documentation Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team
Milestone

Comments

@Vilican
Copy link
Contributor

Vilican commented Jul 27, 2024

Describe the bug

active property does not work - changes are not reflected in the component

Reproducer

https://stackblitz.com/edit/vitejs-vite-vnppvc?file=src%2FApp.tsx

System Information

  System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor            
    Memory: 13.76 GB / 31.91 GB
  Binaries:
    Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.3.1 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    primereact: ^10.7.0 => 10.7.0
    react: ^18.3.1 => 18.3.1

Steps to reproduce the behavior

  1. Click on the Inplace
  2. Observe that nothing is logged in the console
  3. Try to close the Inplace via the X button
  4. Observe that nothing happens or is logged in the console

Expected behavior

No response

@Vilican Vilican added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 27, 2024
@melloware
Copy link
Member

melloware commented Jul 28, 2024

I fixed your stackblitz: https://stackblitz.com/edit/vitejs-vite-pcxo9u?file=src%2FApp.tsx

The docs need to be updated. The active flag is only use in controlled mode when used with onToggle.

const active = props.onToggle ? props.active : activeState;

@melloware melloware added Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team 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 Jul 28, 2024
@melloware
Copy link
Member

I will add a showcase example for this. Thanks for reporting!

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 Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team
Projects
None yet
2 participants