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

ConfirmPopup: Сomponent is not hidden when using the hide function #3202

Closed
PasBazz opened this issue Aug 29, 2022 · 3 comments · Fixed by #3208
Closed

ConfirmPopup: Сomponent is not hidden when using the hide function #3202

PasBazz opened this issue Aug 29, 2022 · 3 comments · Fixed by #3208
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@PasBazz
Copy link
Contributor

PasBazz commented Aug 29, 2022

Describe the bug

  1. confirmPopup function returns array instead of an object
  2. The hide function does not close the СonfirmPopup.

Reproducer

https://codesandbox.io/s/confirmpopup-bug-1nzw6d?file=/src/App.tsx:53-65

PrimeReact version

8.4.0

React version

18.x

Language

ALL

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Open the sandbox
  2. Click the button to activate the pop-up
  3. After 500 milliseconds you can see empty ConfirmPopup

Expected behavior

ConfirmPopup should be closed

@PasBazz PasBazz added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 29, 2022
melloware added a commit to melloware/primereact that referenced this issue Aug 29, 2022
@melloware melloware self-assigned this Aug 29, 2022
@melloware melloware added Type: Bug Issue contains a defect 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 Aug 29, 2022
@melloware melloware added this to the 8.5.0 milestone Aug 29, 2022
@melloware
Copy link
Member

Good catch it was returning array [] instead of JSON object {}

@PasBazz
Copy link
Contributor Author

PasBazz commented Aug 29, 2022

@melloware Please see the reproducer, the ConfirmPopup is displayed again after it has been closed by the hide function

@melloware
Copy link
Member

I fixed it in master. I am using your reproducer code and now you can do this...

actions.hide();

Instead of:

actions[1]();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants