Skip to content

FileUpload Preview columns become misaligned when both image and non-image files are uploaded #585

Closed
@Christoph-Wagner

Description

@Christoph-Wagner

This affects both the Vue 2 and 3 version of PrimeVue and can be seen at the showcase by selecting an image file and a text file:

image

It’s because the row has

<div v-if="isImage(file)">
    <img role="presentation" :alt="file.name" :src="file.objectURL" :width="previewWidth" />
</div>

a simple solution would be to do

<div>
    <img v-if="isImage(file)" role="presentation" :alt="file.name" :src="file.objectURL" :width="previewWidth" />
</div>

instead, but I guess that would be suboptimal if only non-images are uploaded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions