You've already forked AstralRinth
forked from didirus/AstralRinth
Attempt to fix displayName undefined error (#3424)
This commit is contained in:
@@ -51,10 +51,10 @@
|
||||
<Avatar :src="option.icon" :circle="circledIcons" />
|
||||
<div class="text">
|
||||
<div class="title">
|
||||
{{ displayName(option.title) }}
|
||||
{{ getOptionLabel(option.title) }}
|
||||
</div>
|
||||
<div class="author">
|
||||
{{ displayName(option.subtitle) }}
|
||||
{{ getOptionLabel(option.subtitle) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@ const props = defineProps({
|
||||
},
|
||||
displayName: {
|
||||
type: Function,
|
||||
default: (option) => option,
|
||||
default: undefined,
|
||||
},
|
||||
circledIcons: {
|
||||
type: Boolean,
|
||||
@@ -106,6 +106,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
function getOptionLabel(option) {
|
||||
return props.displayName?.(option) ?? option
|
||||
}
|
||||
|
||||
const emit = defineEmits(['input', 'onSelected', 'update:modelValue', 'enter'])
|
||||
|
||||
const dropdownVisible = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user