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

Messages: OnRemove action return Number Type #7209

Closed
linxiaoxin opened this issue Sep 18, 2024 · 5 comments
Closed

Messages: OnRemove action return Number Type #7209

linxiaoxin opened this issue Sep 18, 2024 · 5 comments
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team

Comments

@linxiaoxin
Copy link

Describe the bug

Messages component OnRemove returns Number type instead of MessagesMessage when there are more than 1 messages.

Reproducer

No response

System Information

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
    Memory: 2.75 GB / 15.63 GB
  Binaries:
    Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.8.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    primereact: ^10.6.6 => 10.6.6
    react: ^18.3.1 => 18.3.1

Steps to reproduce the behavior

No response

Expected behavior

No response

@linxiaoxin linxiaoxin added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 18, 2024
@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 18, 2024
Copy link

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@melloware
Copy link
Member

@linxiaoxin can you explain a little bit more or provide some samepl code explaining what you mean?

@linxiaoxin
Copy link
Author

Hi,

I have print out the event as follows onRemove

<Messages ref={msgs} onRemove={(e) => console.log("onRemove:",e)} />

The result is not consistent. Only first onRemove returns the "Message" object. Screen Shot attached

Screenshot 2024-09-19 101837

@melloware
Copy link
Member

This is expected sometimes it removed by ID and sometimes by full message. Either is possible. Do you have some issue?

@melloware melloware changed the title PrimeReact Messages OnRemove action return Number Type Messages: OnRemove action return Number Type Sep 19, 2024
@linxiaoxin
Copy link
Author

i managed workaround this. I don't actually need to handle remove event. thanks for responding

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
@melloware melloware added Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team and removed Status: Needs Reproducer Issue needs a runnable reproducer labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team
Projects
None yet
Development

No branches or pull requests

2 participants