Skip to content

Commit

Permalink
Fix issues with combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
heisand committed Aug 4, 2023
1 parent 2a8c1ec commit a1b25d9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/spor-react/src/input/Combobox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from "react";
import { AriaComboBoxProps, useComboBox, useFilter } from "react-aria";
import { useComboBoxState } from "react-stately";
import { ColorSpinner, Input, InputProps, ListBox, useOutsideClick } from "..";
import { ColorSpinner, Input, InputProps, ListBox } from "..";
import { Popover } from "./Popover";

export type ComboboxProps<T> = AriaComboBoxProps<T> & {
Expand Down Expand Up @@ -96,12 +96,6 @@ export function Combobox<T extends object>({
label,
});

useOutsideClick({
ref: listBoxRef,
handler: state.close,
enabled: true,
});

const {
inputProps: { size, ...inputProps },
listBoxProps,
Expand Down Expand Up @@ -165,6 +159,7 @@ export function Combobox<T extends object>({
state={state}
triggerRef={inputRef as any}
ref={popoverRef}
isNonModal
placement="bottom start"
shouldFlip={false}
hasBackdrop={false}
Expand Down

0 comments on commit a1b25d9

Please sign in to comment.