-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
FilePicker and Markdown: Remove file entries on destroy and file change event #5989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with "batch removal", but I liked the call from dotnet more - because there we can tell when we want that (after OnImageUploadChanged
)
If you do it in js you basically moving the logic there, which gets confusing and hard to maintain. imo the js calls should be as stupid as possible - while keeping the decisions/flows/logic in c#.
The problem with fully JS or fully C# side is that none works 100% times. It all depends on the specific implementation. So I think we can have a hybrid. Use JS fully for FilePicker, and hybrid for Markdown. |
Further improves on #5980
I have changed how
removeFileEntry
is called. Now, it removes all entries when the component is destroyed and when the file(s) is changed. If there were previous file entries, then it will remove them.I have also deleted
RemoveFileEntry
as it didn't make sense to keep it.