fixed views update #188
@ -35,6 +35,14 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
async function modified(){
|
||||
if (typeof props.researchList === 'undefined'){
|
||||
researchList.value = await fetchAllResearches()
|
||||
}
|
||||
else {
|
||||
emit('modified')
|
||||
}
|
||||
}
|
||||
|
||||
const openFilter = () => {
|
||||
isFilterOpened.value = true;
|
||||
@ -112,7 +120,7 @@ const emit = defineEmits(["modified"]);
|
||||
<template>
|
||||
<div id="researches">
|
||||
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
|
||||
<ArticleComponent :allResearcher="allResearcher" :article="articleToDisplay" :isOpen="isResearchOpened" :manage="props.manage" @modal-close="closeResearch" @modified="emit('modified')"></ArticleComponent>
|
||||
<ArticleComponent :allResearcher="allResearcher" :article="articleToDisplay" :isOpen="isResearchOpened" :manage="props.manage" @modal-close="closeResearch" @modified="modified"></ArticleComponent>
|
||||
<div id="search">
|
||||
<input v-if="!isResearcher" type="text" id="search-input" :placeholder="i18n('Search.Researches')" v-model="input"/>
|
||||
<input v-else type="text" id="search-input" :placeholder="i18n('Search.Researchers')" v-model="input"/>
|
||||
|
@ -73,6 +73,10 @@ function update(){
|
||||
}
|
||||
|
||||
}
|
||||
async function modifiedResearch(){
|
||||
researchList.value = await fetchResearches(researcher.value.id)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -111,7 +115,7 @@ function update(){
|
||||
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList"></list-researches></div>
|
||||
<div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList" @modified="modifiedResearch"></list-researches></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user