[Button]: onClick not working in Next.js client component

Open
#10,751 7 comments 0 reactions 1 assignee View on GitHub

@pskelin is already working on this.

Since Feb 4, 2025.

Assessment

This issue has not been assessed yet.

Description

bug High Prio TOPIC Core
Describe the bug

I added a button in a client component and added an onClick handler, but the onClick handler is not called.

If I add a standard HTML button and add an onClick handler, it works. After clicking this button once, the UI5 button works, too.

Isolated Example

https://stackblitz.com/edit/github-jednsxqe?file=app%2Fpage.tsx,app%2Flayout.tsx

Reproduction steps
  1. Add a UI5 button to a client component
  2. Add an onClick handler
  3. Click the button -> nothing happens
Expected Behaviour

The handler should be called.

Screenshots or Videos

No response

UI5 Web Components for React Version

2.6.0

UI5 Web Components Version

2.6.3

Browser

Chrome

Operating System

macOS

Additional Context

No response

Relevant log output

Organization

SAP

Declaration
  • I’m not disclosing any internal or sensitive information.
Dominant language
TypeScript
Stars
1.8k
Forks
285
Avg merge
3d 2h
Merged PRs (30d)
59

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UI5/webcomponents

All issues in UI5/webcomponents

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.