Skip to content

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

Merged
mvorisek merged 13 commits intodevelopfrom
view_js_null_when_explicit
Dec 5, 2022
Merged

View::js()/on() returns null when JS chain is explicitly given#1944
mvorisek merged 13 commits intodevelopfrom
view_js_null_when_explicit

Conversation

@mvorisek
Copy link
Copy Markdown
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 force-pushed the view_js_null_when_explicit branch from cc54753 to 71f1343 Compare December 4, 2022 00:16
@mvorisek mvorisek force-pushed the view_js_null_when_explicit branch from 71f1343 to 607fde5 Compare December 4, 2022 00:17
@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 force-pushed the view_js_null_when_explicit branch from 9ac15dd to 69bcfeb Compare December 4, 2022 18:28
@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

Development

Successfully merging this pull request may close these issues.

1 participant