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

View::js()/on() returns null when JS chain is explicitly given #1944

Merged
merged 13 commits into from
Dec 5, 2022

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Dec 4, 2022

View::js() and View::on() methods newly return null when JS action is passed explicitly.

Previously these methods stored the passed JS action and created & returned another JS chain.

This is not desired as the created JS chain was stored too but very rarely used (and empty JS chains were skipped on render).

updated demos/javascript/js.php demo in this PR shows the rare usage and how to migrate, IMHO the updated code is much more readable

@mvorisek mvorisek changed the title View::js()/on() returns null when JS chain was given View::js()/on() returns null when JS chain is given Dec 4, 2022
@mvorisek mvorisek changed the title View::js()/on() returns null when JS chain is given View::js()/on() returns null when JS chain is explicitly given Dec 4, 2022
@mvorisek mvorisek force-pushed the view_js_null_when_explicit branch 2 times, most recently from 09013bc to 23bcea7 Compare December 4, 2022 14:45
@mvorisek mvorisek marked this pull request as ready for review December 5, 2022 01:37
@mvorisek mvorisek merged commit 18600ed into develop Dec 5, 2022
@mvorisek mvorisek deleted the view_js_null_when_explicit branch December 5, 2022 03:04
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.

None yet

1 participant