-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Type: BugIssue contains a defect related to a specific component.Issue contains a defect related to a specific component.
Description
Describe the bug
When clicking on the upload button and encountering an upload error, the previous image remains in the data-pc-section="content" field even after multiple failed attempts. Before the upload, the image selection works fine. However, after an error occurs during the upload process, selecting a new image shows both the previous and the new image. This issue persists across multiple attempts.
Note : multiple prop is false.
Reproducer
https://stackblitz.com/edit/vitejs-vite-j6olr6ee?file=src%2FApp.tsx
System Information
System:
OS: Windows 10 10.0.17763
CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Memory: 8.41 GB / 15.94 GB
Binaries:
Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.17763.1.0)
Internet Explorer: 11.0.17763.592
npmPackages:
primereact: ^10.9.1 => 10.9.2
react: ^19.0.0 => 19.0.0
tailwindcss: ^3.4.17 => 3.4.17Steps to reproduce the behavior
- Select an image to upload.
- Encounter an upload error.
- Select a new image for upload.
- Both the previous and the new images are displayed.
Expected behavior
The previous image should be cleared from data-pc-section="content" after each failed upload, ensuring only the newly selected image is displayed.
Metadata
Metadata
Assignees
Labels
Type: BugIssue contains a defect related to a specific component.Issue contains a defect related to a specific component.