Skip to content

Conversation

@ysds
Copy link

@ysds ysds commented Dec 22, 2025

Summary

Deep merge floatingUIOptions to preserve internal settings when custom options are passed.

Rationale

Closes #2308

Changes

  • Use lodash.merge instead of spread operator for deep merging floatingUIOptions in all controller components
  • Add satisfies FloatingUIOptions to the first argument of merge() to maintain type inference for callback parameters (e.g., onOpenChange)

Impact

Users can now pass partial floatingUIOptions without losing the controller's internal default settings.

Testing

Build passes.

Screenshots/Video

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

…ellOS#2308

Use lodash.merge instead of spread operator to properly merge nested
floatingUIOptions properties. This prevents user-provided options like
`useFloatingOptions: { strategy: "fixed" }` from overwriting internal
settings such as `open`, `onOpenChange`, `placement`, and `middleware`.
@vercel
Copy link

vercel bot commented Dec 22, 2025

@ysds is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

floatingUIOptions.useFloatingOptions completely overwrites internal settings instead of merging

1 participant