[Vuejs]-How to set class to child element inside v-for loop

0👍

Your logic is wrong – the method checkUploadedDocuments will return Array but it must return Boolean.

<div class="loading-doc-item"
 v-for="referenceDetails in referenceDetailsDocumentsData" :key="referenceDetails.id">
  <div class="loading-doc-show">
    {{ referenceDetails.name }}
    <span class="upload-status">
        <i class="fa" 
          :class="{documentsData && documentsData.length &&
            documentsData.findIndex(item => item.id === referenceDetails.id) !== -1 
            ? 'fa-check-circle' : 'fa-check'}"></i>
    </span>
  </div>
</div>

Leave a comment