Skip to content

Commit

Permalink
Fixed #343 - Messages are not visible in simple uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Jul 4, 2020
1 parent 944b1d0 commit 4bc9101
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/fileupload/FileUpload.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="p-fileupload p-component" v-if="isAdvanced">
<div class="p-fileupload p-fileupload-advanced p-component" v-if="isAdvanced">
<div class="p-fileupload-buttonbar">
<span :class="advancedChooseButtonClass" @click="choose" @keydown.enter="choose" @focus="onFocus" @blur="onBlur" v-ripple tabindex="0" >
<input ref="fileInput" type="file" @change="onFileSelect" :multiple="multiple" :accept="accept" :disabled="disabled" />
Expand Down Expand Up @@ -29,11 +29,14 @@
</div>
</div>
</div>
<span :class="basicChooseButtonClass" @mouseup="onBasicUploaderClick" v-else-if="isBasic" @keydown.enter="choose" @focus="onFocus" @blur="onBlur" v-ripple tabindex="0" >
<span :class="basicChooseButtonIconClass"></span>
<span class="p-button-label">{{basicChooseButtonLabel}}</span>
<input ref="fileInput" type="file" :accept="accept" :disabled="disabled" @change="onFileSelect" @focus="onFocus" @blur="onBlur" v-if="!hasFiles" />
</span>
<div class="p-fileupload p-fileupload-advanced p-component" v-else-if="isBasic">
<FileUploadMessage v-for="msg of messages" severity="error" :key="msg">{{msg}}</FileUploadMessage>
<span :class="basicChooseButtonClass" @mouseup="onBasicUploaderClick" @keydown.enter="choose" @focus="onFocus" @blur="onBlur" v-ripple tabindex="0" >
<span :class="basicChooseButtonIconClass"></span>
<span class="p-button-label">{{basicChooseButtonLabel}}</span>
<input ref="fileInput" type="file" :accept="accept" :disabled="disabled" @change="onFileSelect" @focus="onFocus" @blur="onBlur" v-if="!hasFiles" />
</span>
</div>
</template>

<script>
Expand Down

0 comments on commit 4bc9101

Please sign in to comment.