fix: added disabled & placement prop in Link component
(cherry picked from commit 33e4072430d4fa117bcc95553a6f31593282a18d)
This commit is contained in:
parent
f733ef2fe7
commit
59030f8d44
@ -10,6 +10,8 @@
|
|||||||
:size="attrs.size || 'sm'"
|
:size="attrs.size || 'sm'"
|
||||||
:variant="attrs.variant"
|
:variant="attrs.variant"
|
||||||
:placeholder="attrs.placeholder"
|
:placeholder="attrs.placeholder"
|
||||||
|
:disabled="attrs.disabled"
|
||||||
|
:placement="attrs.placement"
|
||||||
:filterable="false"
|
:filterable="false"
|
||||||
>
|
>
|
||||||
<template #target="{ open, togglePopover }">
|
<template #target="{ open, togglePopover }">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Combobox v-model="selectedValue" nullable v-slot="{ open: isComboboxOpen }">
|
<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 }">
|
<template #target="{ open: openPopover, togglePopover }">
|
||||||
<slot
|
<slot
|
||||||
name="target"
|
name="target"
|
||||||
@ -34,6 +34,7 @@
|
|||||||
{{ placeholder || '' }}
|
{{ placeholder || '' }}
|
||||||
</div>
|
</div>
|
||||||
<FeatherIcon
|
<FeatherIcon
|
||||||
|
v-if="!disabled"
|
||||||
name="chevron-down"
|
name="chevron-down"
|
||||||
class="absolute h-4 w-4 text-ink-gray-5 right-2"
|
class="absolute h-4 w-4 text-ink-gray-5 right-2"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@ -142,7 +143,7 @@ import {
|
|||||||
ComboboxOptions,
|
ComboboxOptions,
|
||||||
ComboboxOption,
|
ComboboxOption,
|
||||||
} from '@headlessui/vue'
|
} 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'
|
import { ref, computed, useAttrs, useSlots, watch, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -174,6 +175,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
placement: {
|
||||||
|
type: String,
|
||||||
|
default: 'bottom-start',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:modelValue', 'update:query', 'change'])
|
const emit = defineEmits(['update:modelValue', 'update:query', 'change'])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user