Skip to content

[mergeProps] secondary arguments are undefined #4597

Closed

Description

@cgatian

Bug report

Current behavior

The mergeProps utility seems to have changed in behavior. When events are being merged the arguments for those events are `undefined.

Image

mergeProps should invoke each event and preserve arguments.

For example, if you use mergeProps to combine the onOpenChange, the eventDetails argument is undefined

  const handleOnOpenChange: AlertDialog.Root.Props['onOpenChange'] = (
    open,
    eventDetails
  ) => {
    // eventDetails is undefined?
    console.log(`onOpenChange invoked`, open, eventDetails);
  };
      <AlertDialog.Root {...mergeProps({}, { onOpenChange: handleOnOpenChange })} />

Expected behavior

mergeProps properly merges each event and forwards each argument.

Reproducible example

StackBlitz

Base UI version

1.4.0

Which browser are you using?

Edge

Which OS are you using?

Mac OS

Which assistive tech are you using (if applicable)?

NA

Additional context

Perhaps something internal with this change?
#4336

Activity

  1. added
    status: waiting for maintainer
    on Apr 13, 2026
  2. changed the title [-][mergeProps] Arguments not being passed[/-] [+][mergeProps] secondary arguments to merged function are undefined[/+] on Apr 13, 2026
  3. changed the title [-][mergeProps] secondary arguments to merged function are undefined[/-] [+][mergeProps] secondary arguments are undefined[/+] on Apr 13, 2026
  4. added
    type: regression
    and removed
    status: waiting for maintainer
    on Apr 13, 2026
  5. atomiks commented on Apr 13, 2026

    @atomiks
    Contributor

    It's from #4330 - the wrapped custom event handlers only receive the first argument now

  6. github-actions commented on Apr 20, 2026

    @github-actions

    This fix will be available in the next npm release of Base UI.

    In the meantime, you can try it out on our Canary release channel:

    npm i https://pkg.pr.new/@base-ui/react@4598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: public utilstype: regression

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions