Skip to content

Commit dc6ab93

Browse files
authored
Merge pull request #608 from frappe/develop
2 parents c18c91a + 9910382 commit dc6ab93

File tree

1 file changed

+15
-2
lines changed
  • frontend/src/components/Controls

1 file changed

+15
-2
lines changed

frontend/src/components/Controls/Link.vue

+15-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,19 @@
2525
</template>
2626

2727
<template #item-label="{ active, selected, option }">
28-
<slot name="item-label" v-bind="{ active, selected, option }" />
28+
<slot name="item-label" v-bind="{ active, selected, option }">
29+
<div v-if="option.description" class="flex flex-col gap-1">
30+
<div class="flex-1 font-semibold truncate text-ink-gray-7">
31+
{{ option.label }}
32+
</div>
33+
<div class="flex-1 text-sm truncate text-ink-gray-5">
34+
{{ option.description }}
35+
</div>
36+
</div>
37+
<div v-else class="flex-1 truncate text-ink-gray-7">
38+
{{ option.label }}
39+
</div>
40+
</slot>
2941
</template>
3042

3143
<template #footer="{ value, close }">
@@ -131,8 +143,9 @@ const options = createResource({
131143
transform: (data) => {
132144
let allData = data.map((option) => {
133145
return {
134-
label: option.value,
146+
label: option.label || option.value,
135147
value: option.value,
148+
description: option.description,
136149
}
137150
})
138151
if (!props.hideMe && props.doctype == 'User') {

0 commit comments

Comments
 (0)