DataJuggler / BlazorFileUpload

This was originally a wrapper of Steve Sanderson's BlazorFileInput. It has since been upgraded to a wrapper of ASP.NET CORE FileInput
32 stars 11 forks source link

Uploading in EditForm resets the page #8

Closed QadiymStewart closed 4 years ago

QadiymStewart commented 4 years ago

Some how when the component is used within an edit form it submits the form when upload finishes. Any fix for this?

DataJuggler commented 4 years ago

I am building an image gallery sample and I have not experienced this issue. I will post the database for this project and setup instructions as soon as I can, but if you run this sample, click the SIgn Up button you can see how I did it maybe it will help you:

https://github.com/DataJuggler/BlazorImageGallery

Edit: I just tried this and I forgot I did something and broke the FileUpload on this sample. I will have to fix it and check it in again, but the code was working.

The Login control located in the Components directory is where the Sign Up code is located.

If your code is something you can share I can take a look at it when I get time (my weekend free time just ran out). I do not have much to go by from your description of the issue.

Sorry it isn't working for you.

Corby

QadiymStewart commented 4 years ago

Alright it seems to be working fine in a clean project. Must be something in the current project I'm working on looks like StateHasChanged is getting triggered somewhere.

QadiymStewart commented 4 years ago

Found the bug. It was the live reload package I was using. Got to ignore that upload folder so it doesn't trigger. Thanks for the fast response tho. 👍