Commit 10f36beb authored by Anthony Gautreau's avatar Anthony Gautreau
Browse files

Chargement des données à chaque apparitions du component

parent 10ab50fd
Loading
Loading
Loading
Loading
+5 −1
Changes for frontend/src/components/Utilisateur.vue: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@
</template>

<script setup>
import { ref, computed, onMounted, reactive, inject, watch } from 'vue'
import {ref, computed, onMounted, reactive, inject, watch, onActivated} from 'vue'
import UtilisateurEdit from "@/components/UtilisateurEdit.vue";
import RoleAssignation from "@/components/RoleAssignation.vue";

@@ -139,6 +139,10 @@ const reload = async () => {
    })
}

onActivated(() => {
    reload().catch(e => console.error(e))
})

onMounted(async () => {
  const pinia = getActivePinia()
  if (!pinia) {