Skip to content

Commit

Permalink
fix(#3137): expose closeOnContentClick prop from modal (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem authored Mar 15, 2023
1 parent e2c8b19 commit 57635f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions packages/ui/src/components/va-date-input/VaDateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export default defineComponent({
modelValue: { type: [Date, Array, Object, String, Number] as PropType<DateInputModelValue> },
resetOnClose: { type: Boolean, default: true },
closeOnContentClick: { type: Boolean, default: false },
offset: { ...VaDropdownProps.offset, default: () => [2, 0] },
isOpen: { type: Boolean, default: undefined },
format: { type: Function as PropType<(date: DateInputModelValue) => string> },
Expand Down Expand Up @@ -391,12 +393,11 @@ export default defineComponent({
...omit(attrs, ['class', 'style']),
}))
const filteredProps = filterComponentProps(VaDropdownProps)
const dropdownPropsComputed = computed(() => ({
...filterComponentProps(VaDropdownProps).value,
offset: [2, 0] as DropdownOffsetProp,
...filteredProps.value,
stateful: false,
keyboardNavigation: true,
closeOnContentClick: false,
innerAnchorSelector: '.va-input-wrapper__field',
}))
Expand Down
9 changes: 5 additions & 4 deletions packages/ui/src/components/va-time-input/VaTimeInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export default defineComponent({
...useValidationProps as ValidationProps<Date>,
isOpen: { type: Boolean, default: undefined },
closeOnContentClick: { type: Boolean, default: false },
offset: { ...VaDropdownProps.offset, default: () => [2, 0] },
placement: { ...VaDropdownProps.placement, default: 'bottom-start' },
modelValue: { type: Date, default: undefined },
clearValue: { type: Date, default: undefined },
format: { type: Function as PropType<(date?: Date) => string> },
Expand Down Expand Up @@ -326,12 +329,10 @@ export default defineComponent({
...omit(attrs, ['class', 'style']),
}))
const filteredProps = filterComponentProps(VaDropdownProps)
const dropdownPropsComputed = computed(() => ({
...filterComponentProps(VaDropdownProps).value,
closeOnContentClick: false,
offset: [2, 0] as DropdownOffsetProp,
...filteredProps.value,
keyboardNavigation: true,
placement: 'bottom-start' as Placement,
innerAnchorSelector: '.va-input-wrapper__field',
}))
Expand Down

0 comments on commit 57635f2

Please sign in to comment.