Closed webdevian closed 7 years ago
To use javascript expressions, use the option 'expressionLanguage' => 'js'
, else you should enter PHP expressions ($selected = $option['value'] === $selectedValue
) because the default mode (auto) does just handle simple replacements if there is no possible conflict between PHP and JS syntaxes.
I will not change this behaviour since the next version comes with a complete refactoring.
Thanks, that should make life a lot easier for me
Slight correction, it was 'expressionLanguage' => 'js
that I needed
Sorry, I edit, thanks for correction.
In a mixin I have the following line:
- var selected = option.value === selectedValue
where selectedValue is a mixin parameterIt compiles to the following php and throws this notice : Message: Use of undefined constant value - assumed 'value'
$selected = $option['value'] === selectedValue ? true : false
I think it should compile to
$selectedValue
(which suppresses the notice). Unless there is a better way for me to write it?This is the context within the mixin