[FileUpload] FileUpload does not work since upgrade to primereact 8

UI Components for React
Post Reply
anslume
Posts: 3
Joined: 13 Apr 2022, 22:08

29 Aug 2022, 17:20

Hi everyone,

I have a very weird issue since I upgraded to PrimeReact 8.xx
All my file upload components are not triggering anything.
The components are rendered, but when I click on it, the "select file from" window is not appearing.

There seems to be a preventDefault or stopPropagation somewhere because when I tried to have a <input type="file" /> the same is happening.
I see the "choose file" button, but nothing happens when I click on it.

When I switch back to primeReact 7.2.1, everything is working again (FileUploads are behaving normally)
My react version is 18.2.0 when I use the primeReact 8.xx package.

I checked all over my code; I'm not overriding any behavior for the input type=file tags.

Many thanks in advance for potential enlightenment,

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

03 Sep 2022, 14:01

Hmm I am using FileUpload with 8.4.0 and its working properly? Can you put together a Code Sandbox reproducer showing the issue? Use this: https://codesandbox.io/s/xgsy8m
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

anslume
Posts: 3
Joined: 13 Apr 2022, 22:08

17 Jan 2023, 16:50

@Meloware

Sorry for the late feedback, I abandoned migrating, and yesterday I decided to upgrade my library.
I still have the same issue for any type of input file. (even without a file upload and with a simple <input type="file" />

It seems to be only an issue with there is SideBar Component.

It seems to preventdefault or stop probation all the input-type file.

Please have a look at the following:

https://codesandbox.io/s/withered-water ... oadDemo.js

I would be grateful, if you have a solution or any enlightenments?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

17 Jan 2023, 18:22

I think your issue might be this one: https://github.com/primefaces/primereact/issues/3360

Can you check it?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

anslume
Posts: 3
Joined: 13 Apr 2022, 22:08

17 Jan 2023, 18:31

it definetly seems similar, but maybe different behaviours under the hooks?
Shall I comment under the issue on github?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

21 Jan 2023, 19:23

Yep comment under there but i am pretty sure its the same issue.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests