Skip to content

Commit

Permalink
refactor: Use constant instead of inline string
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Nov 2, 2024
1 parent 2956562 commit 72592e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VueDatePicker/composables/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export const usePosition = ({
const getMenuPlacement = (): MenuPlacement => {
const inputEl = unrefElement(inputRef as MaybeElementRef);
if (inputEl) {
if (props.autoPosition === 'top') return MenuPlacement.top;
if (props.autoPosition === 'bottom') return MenuPlacement.bottom;
if (props.autoPosition === MenuPlacement.top) return MenuPlacement.top;
if (props.autoPosition === MenuPlacement.bottom) return MenuPlacement.bottom;
const { height: menuHeight } = menuRect.value;
const { top: inputTop, height: inputHeight } = inputEl.getBoundingClientRect();

Expand Down

0 comments on commit 72592e1

Please sign in to comment.