Skip to content

Commit

Permalink
Updated change emit in SelectMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
brkelly20 committed Jul 24, 2024
1 parent f196b61 commit dc66290
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion houston-common-ui/lib/components/SelectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ref,
computed,
watchEffect,
watch,
} from "vue";
import Disclosure from "@/components/Disclosure.vue";
import { ChevronDownIcon } from "@heroicons/vue/20/solid";
Expand All @@ -33,7 +34,7 @@ const props = withDefaults(
);
const emit = defineEmits<{
(e: "change", value: string): void;
(e: "change", value: unknown): void;
}>();
const currentSelectionIndex = computed<number | undefined>(() => {
Expand Down Expand Up @@ -68,6 +69,8 @@ const { inputBuffer, onInput } = useTempInputBuffer(1000);
const optionRefs = ref<HTMLButtonElement[]>([]);
watch(model, () => emit('change', model.value), {deep: true, immediate: true})
watchEffect(() => {
const searchText = inputBuffer.value?.toLowerCase();
if (searchText === undefined) {
Expand Down

0 comments on commit dc66290

Please sign in to comment.