|
12 | 12 | /> |
13 | 13 | </template> |
14 | 14 | <template v-else> |
15 | | - <div v-if="actionRow.showPreview" class="dp__selection_preview" :title="formatValue" :style="previewStyle"> |
| 15 | + <div |
| 16 | + v-if="actionRow.showPreview" |
| 17 | + class="dp__selection_preview" |
| 18 | + :title="formatValue || undefined" |
| 19 | + :style="previewStyle" |
| 20 | + > |
16 | 21 | <slot v-if="$slots['action-preview'] && showPreview" name="action-preview" :value="modelValue" /> |
17 | 22 | <template v-if="!$slots['action-preview'] && showPreview"> |
18 | 23 | {{ formatValue }} |
|
45 | 50 | ref="select-btn" |
46 | 51 | type="button" |
47 | 52 | class="dp__action_button dp__action_select" |
48 | | - :disabled="disabled" |
| 53 | + :disabled="boolHtmlAttribute(disabled)" |
49 | 54 | data-test-id="select-button" |
50 | 55 | @keydown="checkKeyDown($event, () => selectDate())" |
51 | 56 | @click="selectDate" |
|
62 | 67 | import { computed, onUnmounted, onMounted, ref, useTemplateRef } from 'vue'; |
63 | 68 | import { unrefElement } from '@vueuse/core'; |
64 | 69 |
|
65 | | - import { useArrowNavigation, useContext, useFormatter, useHelperFns, useValidation } from '@/composables'; |
| 70 | + import { useArrowNavigation, useContext, useFormatter, useHelperFns, useValidation, useUtils } from '@/composables'; |
66 | 71 |
|
67 | 72 | interface ActionRowEmits { |
68 | 73 | 'close-picker': []; |
|
93 | 98 | const { buildMatrix } = useArrowNavigation(); |
94 | 99 | const { formatPreview } = useFormatter(); |
95 | 100 | const { checkKeyDown, convertType } = useHelperFns(); |
| 101 | + const { boolHtmlAttribute } = useUtils(); |
96 | 102 |
|
97 | 103 | const cancelButtonRef = useTemplateRef('cancel-btn'); |
98 | 104 | const selectButtonRef = useTemplateRef('select-btn'); |
|
0 commit comments