diff --git a/src/components/Global/SelectBox.vue b/src/components/Global/SelectBox.vue
index 6190d0f..7fdd5ef 100644
--- a/src/components/Global/SelectBox.vue
+++ b/src/components/Global/SelectBox.vue
@@ -5,15 +5,15 @@
{{ computedSelectedItem.value }}
-
-
+
+
+
@@ -83,20 +83,12 @@ export default defineComponent({
);
});
- const computedHeight = computed(() =>
- listRef.value ? getComputedStyle(listRef.value).height : 0
- );
-
- const buttonFocused = computed(() => document.activeElement);
-
return {
computedSelectedItem,
listOpen,
selectedItem,
listRef,
buttonRef,
- computedHeight,
- buttonFocused,
activeEl,
};
},
@@ -109,40 +101,16 @@ export default defineComponent({
this.$emit("selected", item);
},
- toggleBox() {
+ toggleBox(e: Event) {
this.listOpen = !this.listOpen;
+
+ if (!this.listOpen) (e.target as HTMLButtonElement).blur();
},
clickedOutside() {
this.listOpen = false;
this.buttonRef?.blur();
},
-
- expandEnter(el: HTMLElement) {
- el.style.height = "auto";
-
- const currentHeight = getComputedStyle(el).height;
-
- el.style.height = "0";
-
- setTimeout(() => {
- el.style.height = currentHeight;
- }, 50);
- },
-
- expandAfterEnter(el: HTMLElement) {
- el.style.height = "auto";
- },
-
- expandLeave(el: HTMLElement) {
- el.style.height = getComputedStyle(el).height;
-
- getComputedStyle(el);
-
- setTimeout(() => {
- el.style.height = "0";
- }, 50);
- },
},
});
@@ -150,11 +118,24 @@ export default defineComponent({
\ No newline at end of file