fix(SearchSelect) : render option-description slot even without optionDescription prop

The v-if on resolveDescription() was hiding the entire slot when
optionDescription prop was not provided. Now checks for slot presence
first, allowing custom formatDescription in PieceSelect/ProductSelect/
ComposantSelect to render properly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-16 15:54:24 +01:00
parent ab05ce589d
commit 974b74ee9f

View File

@@ -69,7 +69,7 @@
{{ resolveLabel(option) }}
</slot>
</span>
<span v-if="resolveDescription(option)" class="text-xs text-base-content/50">
<span v-if="$slots['option-description'] || resolveDescription(option)" class="text-xs text-base-content/50">
<slot name="option-description" :option="option">
{{ resolveDescription(option) }}
</slot>