Skip to content

Commit

Permalink
Render virtual items during an exiting transition (#3160)
Browse files Browse the repository at this point in the history
Otherwise the render function will get called with different options by `render()` resulting in undefined
  • Loading branch information
thecrypticace committed May 1, 2024
1 parent cb1abe4 commit 2e6cb12
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1659,7 +1659,7 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(
})

// Map the children in a scrollable container when virtualization is enabled
if (data.virtual && data.comboboxState === ComboboxState.Open) {
if (data.virtual && visible) {
Object.assign(theirProps, {
// @ts-expect-error The `children` prop now is a callback function that receives `{ option }`.
children: <VirtualProvider>{theirProps.children}</VirtualProvider>,
Expand Down

0 comments on commit 2e6cb12

Please sign in to comment.