fix(component-edit) : force reload catalog to display pre-selected slot items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-16 10:32:07 +01:00
parent 271844efb1
commit 428da471d1
4 changed files with 13 additions and 13 deletions

View File

@@ -81,10 +81,10 @@ onMounted(() => {
watch(
() => props.modelValue,
(value) => {
if (typeof value === 'string') {
if (typeof value === 'string' && value) {
const exists = productOptions.value.some((product) => product.id === value)
if (!exists && productOptions.value.length === 0 && !loading.value) {
loadProducts().catch((error) => {
if (!exists && !loading.value) {
loadProducts({ force: true }).catch((error) => {
console.error('Erreur lors du chargement des produits:', error)
})
}