Skip to content

Commit d8c538e

Browse files
committed
refactor(CTooltip): change default trigger value from 'hover' to () => ['hover', 'focus']
1 parent 82ce0fd commit d8c538e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/coreui-vue/src/components/tooltip/CTooltip.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineComponent, h, PropType, ref, RendererElement, Teleport, Transition } from 'vue'
22
import { createPopper, Placement } from '@popperjs/core'
33

4-
import type { Placements } from '../../types'
4+
import type { Placements, Triggers } from '../../types'
55
import { executeAfterTransition } from '../../utils/transition'
66
import { getRTLPlacement } from '../../utils'
77

@@ -53,9 +53,9 @@ const CTooltip = defineComponent({
5353
* @values 'click', 'focus', 'hover'
5454
*/
5555
trigger: {
56-
type: [String, Array] as PropType<string | string[]>,
57-
default: 'hover',
58-
validator: (value: string | string[]) => {
56+
type: [String, Array] as PropType<Triggers | Triggers[]>,
57+
default: () => ['hover', 'focus'],
58+
validator: (value: Triggers | Triggers[]) => {
5959
if (typeof value === 'string') {
6060
return ['click', 'focus', 'hover'].includes(value)
6161
}

0 commit comments

Comments
 (0)