Skip to content

Commit

Permalink
fix: wrap focus listener into function (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
masyoudi authored Feb 26, 2024
1 parent a888192 commit b1b6586
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/oruga/src/components/datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ const boxClassBind = computed(() => getActiveClasses(boxClasses.value));
// --- Expose Public Functionalities ---
/** expose functionalities for programmatic usage */
defineExpose({ focus: pickerRef.value.focus });
defineExpose({ focus: () => pickerRef.value?.focus() });
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion packages/oruga/src/components/timepicker/Timepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ const boxClassBind = computed(() => getActiveClasses(boxClasses.value));
// --- Expose Public Functionalities ---
/** expose functionalities for programmatic usage */
defineExpose({ focus: pickerRef.value.focus });
defineExpose({ focus: () => pickerRef.value?.focus() });
</script>

<template>
Expand Down

0 comments on commit b1b6586

Please sign in to comment.