Skip to content

Commit

Permalink
chore: useListBoxにhooksを統合したため、setterを依存関係に含める必要がなくなった
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Jan 27, 2025
1 parent da61340 commit 49ad100
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/smarthr-ui/src/components/ComboBox/useListBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const useListBox = <T,>({
if (!isExpanded) {
setActiveOption(null)
}
}, [isExpanded, setActiveOption])
}, [isExpanded])

const listBoxRef = useRef<HTMLDivElement>(null)
const [listBoxRect, setListBoxRect] = useState<Rect>({
Expand Down Expand Up @@ -244,7 +244,7 @@ export const useListBox = <T,>({
setActiveOption(null)
}
},
[activeOption, moveActiveOptionIndex, onAdd, onSelect, setActiveOption],
[activeOption, moveActiveOptionIndex, onAdd, onSelect],
)

const { createPortal } = usePortal()
Expand Down Expand Up @@ -281,7 +281,7 @@ export const useListBox = <T,>({
setNavigationType('pointer')
setActiveOption(option)
},
[setActiveOption],
[],
)

const wrapperStyleAttr = useMemo(() => {
Expand Down

0 comments on commit 49ad100

Please sign in to comment.