Skip to content

Fixing FormInputwithAddon with no click#114

Merged
DerekAgility merged 1 commit into
mainfrom
dlo/fix-forminput-add-on-click
May 12, 2026
Merged

Fixing FormInputwithAddon with no click#114
DerekAgility merged 1 commit into
mainfrom
dlo/fix-forminput-add-on-click

Conversation

@DerekAgility
Copy link
Copy Markdown
Contributor

@DerekAgility DerekAgility commented May 8, 2026

Part of https://agilitycms.atlassian.net/browse/PROD-1038

The problem

Somewhere along the way, the plenum component FormInputWithAddon with the onClick prop failed to propagate the click event back up to its parent.

The fix

TablerIcon.tsx — Added ...rest to the destructure and spread it onto <i {...rest}>, so onClick, onMouseDown, and any other HTML attributes now reach the DOM element.

FormInputWithAddons.tsx — The trail icon section now branches on trailIcon?.onClick:

With onClick: renders a that calls e.preventDefault() then the handler, so the click fires correctly without form-submission side effects or focus-stealing.
Without onClick: falls through to the original path, preserving the existing click-to-focus behaviour.

To test

  1. Go to the preview link
  2. Find the story for FormInputWithAddon - Trail Icon with onclick
  3. Go to the actions tab
  4. Click on the xicon, you should see actions being fired

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plenum-ui Ready Ready Preview, Comment May 8, 2026 11:11pm

Request Review

@DerekAgility DerekAgility merged commit 60852d1 into main May 12, 2026
4 checks passed
@DerekAgility DerekAgility deleted the dlo/fix-forminput-add-on-click branch May 12, 2026 14:25
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.

2 participants