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

Improved FileInput Image Preview Rendering #1680

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

LegendOfLynkle
Copy link
Contributor

The RadzenFileInput component has support for byte[] in addition to the default of string, however when using byte[] the image preview would not display correctly as it would just reference Value directly for the src attribute of the preview img. This would result in something like the following:
CleanShot 2024-09-07 at 09 39 53

To address this I have added a new private get only property that will decode the Value if the TValue is of byte[]. This results in the image preview behaving normally eg:
CleanShot 2024-09-07 at 11 28 17

Additionally I have added a corresponding demo to the FileInput Demos to highlight this usage.

Pleases let me know if additional changes are required. I tried to keep things aligned style wise where I could and as this is my first PR on this project any feedback would be appreciated 😄

…iew of an image correctly when using byte[] as the TValue instead of string. Added a corresponding demo to highlight this.
@enchev enchev merged commit fad024d into radzenhq:master Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants