Skip to content

Commit 72592e1

Browse files
committed
refactor: Use constant instead of inline string
1 parent 2956562 commit 72592e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/VueDatePicker/composables/position.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ export const usePosition = ({
180180
const getMenuPlacement = (): MenuPlacement => {
181181
const inputEl = unrefElement(inputRef as MaybeElementRef);
182182
if (inputEl) {
183-
if (props.autoPosition === 'top') return MenuPlacement.top;
184-
if (props.autoPosition === 'bottom') return MenuPlacement.bottom;
183+
if (props.autoPosition === MenuPlacement.top) return MenuPlacement.top;
184+
if (props.autoPosition === MenuPlacement.bottom) return MenuPlacement.bottom;
185185
const { height: menuHeight } = menuRect.value;
186186
const { top: inputTop, height: inputHeight } = inputEl.getBoundingClientRect();
187187

0 commit comments

Comments
 (0)