fix: added disabled & placement prop in Link component

This commit is contained in:
Shariq Ansari 2025-07-10 16:14:32 +05:30
parent c7fbd6f8f1
commit 33e4072430
2 changed files with 9 additions and 2 deletions

View File

@ -10,6 +10,8 @@
:size="attrs.size || 'sm'"
:variant="attrs.variant"
:placeholder="attrs.placeholder"
:disabled="attrs.disabled"
:placement="attrs.placement"
:filterable="false"
>
<template #target="{ open, togglePopover }">

View File

@ -1,6 +1,6 @@
<template>
<Combobox v-model="selectedValue" nullable v-slot="{ open: isComboboxOpen }">
<Popover class="w-full" v-model:show="showOptions">
<Popover class="w-full" v-model:show="showOptions" :placement="placement">
<template #target="{ open: openPopover, togglePopover }">
<slot
name="target"
@ -34,6 +34,7 @@
{{ placeholder || '' }}
</div>
<FeatherIcon
v-if="!disabled"
name="chevron-down"
class="absolute h-4 w-4 text-ink-gray-5 right-2"
aria-hidden="true"
@ -142,7 +143,7 @@ import {
ComboboxOptions,
ComboboxOption,
} from '@headlessui/vue'
import { Popover, Button, FeatherIcon } from 'frappe-ui'
import { Popover, FeatherIcon } from 'frappe-ui'
import { ref, computed, useAttrs, useSlots, watch, nextTick } from 'vue'
const props = defineProps({
@ -174,6 +175,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
placement: {
type: String,
default: 'bottom-start',
},
})
const emit = defineEmits(['update:modelValue', 'update:query', 'change'])