Skip to content

#354 Fix onClicked warning if @type is "submit"#526

Merged
mansona merged 1 commit intoember-learn:masterfrom
tcjr:fix-onclick-warning
Mar 13, 2026
Merged

#354 Fix onClicked warning if @type is "submit"#526
mansona merged 1 commit intoember-learn:masterfrom
tcjr:fix-onclick-warning

Conversation

@tcjr
Copy link
Contributor

@tcjr tcjr commented Jan 12, 2025

This is perfectly valid for submit buttons in a form:

<EsButton @type="submit" @label="Search" />

This PR removes the console warning (and stack trace) when a submit button has no onClicked attribute.

You can see it in the wild by looking at the console output for the component page for EsButton.

Fixes #354

@netlify
Copy link

netlify bot commented Jan 12, 2025

Deploy Preview for ember-styleguide failed.

Name Link
🔨 Latest commit 04faf1e
🔍 Latest deploy log https://app.netlify.com/sites/ember-styleguide/deploys/6783e681d56e310008927da0

@tcjr tcjr changed the title Do not show onClicked warning if @type is "submit" #354 Fix onClicked warning if @type is "submit" Jan 12, 2025
@mansona mansona force-pushed the fix-onclick-warning branch from 04faf1e to 334d648 Compare March 13, 2026 15:32
@netlify
Copy link

netlify bot commented Mar 13, 2026

Deploy Preview for ember-styleguide ready!

Name Link
🔨 Latest commit 7918657
🔍 Latest deploy log https://app.netlify.com/projects/ember-styleguide/deploys/69b42e977337b300080f54d9
😎 Deploy Preview https://deploy-preview-526--ember-styleguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mansona mansona force-pushed the fix-onclick-warning branch from 334d648 to 7918657 Compare March 13, 2026 15:34
Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mansona mansona added the bug label Mar 13, 2026
@mansona mansona merged commit c3e5c8d into ember-learn:master Mar 13, 2026
18 of 20 checks passed
@github-actions github-actions bot mentioned this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning "no onClicked" when button component is used with @type="submit" and no click handler

3 participants