Skip to content

Commit

Permalink
ensure we always set portal to true when the anchor props is truthy
Browse files Browse the repository at this point in the history
We already had this for most components, but I missed it for this
component. This fixes that.
  • Loading branch information
RobinMalfait committed Apr 29, 2024
1 parent beaae6a commit 872808c
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -1576,6 +1576,11 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(
let actions = useActions('Combobox.Options')
let anchor = useResolvedAnchor(rawAnchor)

// Always enable `portal` functionality, when `anchor` is enabled
if (anchor) {
portal = true
}

let [floatingRef, style] = useFloatingPanel(anchor)
let getFloatingPanelProps = useFloatingPanelProps()
let optionsRef = useSyncRefs(data.optionsRef, ref, anchor ? floatingRef : null)
Expand Down

0 comments on commit 872808c

Please sign in to comment.