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

File Upload: itemTemplate missing props #3792

Closed
sgnm-mustafa opened this issue Dec 16, 2022 · 0 comments · Fixed by #3793
Closed

File Upload: itemTemplate missing props #3792

sgnm-mustafa opened this issue Dec 16, 2022 · 0 comments · Fixed by #3793
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@sgnm-mustafa
Copy link

Describe the bug

Forum Post: https://forum.primefaces.org/viewtopic.php?f=57&t=78243

When I used file upload component in primereact 7.2.1 version, there is index prop in item template's props.

Then I upgraded primereact to 8+ version. Now index prop is missing.

Reproducer

https://codesandbox.io/s/pedantic-dirac-ogk0lw?file=/src/demo/FileUploadDemo.js

PrimeReact version

8.7.2

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

ALL

Steps to reproduce the behavior

No response

Expected behavior

The following props should return:

interface ItemTemplateOptions {
onRemove(event: React.SyntheticEvent): void;
previewElement: JSX.Element;
fileNameElement: JSX.Element;
sizeElement: JSX.Element;
removeElement: JSX.Element;
formatSize: string;
files: File[];
index: number;
element: JSX.Element;
props: FileUploadProps;
}

@sgnm-mustafa sgnm-mustafa added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 16, 2022
@melloware melloware self-assigned this Dec 16, 2022
melloware added a commit to melloware/primereact that referenced this issue Dec 16, 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 Dec 16, 2022
@melloware melloware added this to the 8.7.4 milestone Dec 16, 2022
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