-
Notifications
You must be signed in to change notification settings - Fork 15
Closed as not planned
Closed as not planned
Copy link
Description
Description:
After the file-upload API call fails and the error prop is set to true on the file-input component, the error styling and message appear correctly, but the trash (clear) icon remains visible. This allows users to attempt to clear a file that never successfully uploaded, causing confusion.
To Reproduce:
- Render:
<TapsiFileInput
label="upload the image"
hideLabel
placeholder="upload the image"
accept="image/*"
disabled={isPending}
loading={isPending}
onInput={handleUploadFile}
error={isError}
errorText="error on uploading the image,please try again!"
/>- Simulate a failed upload by rejecting the API call and setting
isError === true. - Observe that the error styling and text appear, and the trash icon is still rendered.
Expected behavior:
When error={true} (i.e. upload failed), the component should:
- Display the error message
- Hide the trash/clear icon, since there is no valid file to clear.
Desktop:
- OS: macOS 14.4.1
- Browser: Chrome 135
- @tapsioss/web‑components: v0.11.1
Screen Record:
Screen.Recording.1404-01-31.at.12.29.08.mov
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels