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:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user