Skip to content

Commit

Permalink
fix: use deep ref for selectedOptions reactivity closes #100
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Jan 7, 2025
1 parent b708e87 commit d36d1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/useSelect/useListBox.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AriaLabelableProps, Maybe, Orientation, Reactivify } from '../types';
import { computed, InjectionKey, nextTick, onBeforeUnmount, provide, ref, Ref, shallowRef, toValue, watch } from 'vue';
import { computed, InjectionKey, nextTick, onBeforeUnmount, provide, ref, Ref, toValue, watch } from 'vue';
import { hasKeyCode, normalizeProps, removeFirst, withRefCapture } from '../utils/common';
import { useKeyPressed } from '../helpers/useKeyPressed';
import { isMac } from '../utils/platform';
Expand Down Expand Up @@ -53,7 +53,7 @@ export function useListBox<TOption, TValue = TOption>(
) {
const props = normalizeProps(_props);
const listBoxEl = elementRef || ref<HTMLElement>();
const options = shallowRef<OptionRegistrationWithId<TValue>[]>([]);
const options = ref<OptionRegistrationWithId<TValue>[]>([]);
// Initialize popover controller, NO-OP if the element is not a popover-enabled element.
const { isOpen } = usePopoverController(listBoxEl, { disabled: props.disabled });
const finder = useOptionFinder(options);
Expand Down

0 comments on commit d36d1f1

Please sign in to comment.