Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Select::onChange() method #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Select::onChange() method #229

wants to merge 1 commit into from

Conversation

vjik
Copy link
Member

@vjik vjik commented Nov 20, 2024

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d073b0e) to head (fcdffd7).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #229   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       806       807    +1     
===========================================
  Files             86        86           
  Lines           2213      2217    +4     
===========================================
+ Hits            2213      2217    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@vjik vjik requested a review from a team November 20, 2024 13:35
@vjik vjik added the status:code review The pull request needs review. label Nov 20, 2024
*
* @param string $value The script to be run when select value is changed.
*/
public function onChange(string $value): self
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should add it:

  1. It's not a good practice to use such attributes with inline JavaScript.
  2. There are tons of such events for every tag. Are we going to add every possible event?

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. I agree, this HTML attribute is rare used. However, I have needed it a few times, and make it with this method more convient than attribute() method usage.

  2. Step by step, when they are needed in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants