Action's parameters are not being passed correctly
See original GitHub issueDescribe the bug When you pass a list of parameters to an action, only the last parameter in the list is being received by the function. What’s more, the parameter is being “moved” to the first position.
<script>
function test (node, el1, el2, el3) {
console.log(el1, el2, el3) // logs `third undefined undefined`, instead of `first second third`
}
</script>
<h1 use:test={'first', 'second', 'third'}>Hello!</h1>
This used to work in 3.12.1 but it doesn’t work in 3.24.0
To Reproduce Open the this REPL and see the logs. Compare the logs with that one.
Expected behavior Parameters should be passed correctly.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Parameters not being properly passed to controller action ...
I've noticed that only the first parameter ( p1 ) is getting a value from the front end; all my other parameters are...
Read more >Parameter Actions - Tableau
You can use parameter actions with reference lines, calculations, filters, and SQL queries, and to customize how you display data in your visualizations....
Read more >Passing parameters
Passing parameters. Parameters are additional information to be used in the recipe in the form of datapills. Defining parameters in the Workbot trigger ......
Read more >How to pass input parameter of Client Action in javascript?
From Javascript, I'm Trying to call a client action which takes an input parameters. Something like: Response = setTimeout(function() { $actions.Click() // No...
Read more >Named and Optional Arguments - C# Programming Guide
Named arguments in C# specify arguments by name, not position. ... In the example below, the parameter orderNum is in the correct position ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We agreed to rephrase a bit to clarify that actions can have just one parameter (although the signature is correct), re-opening.
Multiple parameters working was a bug and we have fixed that now.
@yuliankarapetkov
No, the current behaviour is expected. The argument you provide to an action is an expression that is passed as the second parameter to the action function:
Is actually doing this:
Evaluating the expression
(1, 2, 3)
will return3
.