question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to pass data to function

See original GitHub issue

Hello, After lots of search, I finally ended up with your package & I must say you have done great job. I found some thing which you may add.

Here is my code to delete an entity.

<button v-confirm="{ok: delete(item)}">Delete</button>

When I am passing data to delete function, it doesn’t work. However if I don’t pass data, it works. Is there any chances you will make it work?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Godofbrowsercommented, Jun 20, 2018

Hello @justinbkay , please confirm that the key attribute is set uniquely for each item in the loop since you’re dealing with a list of items. Ex:

<td v-for="domain in domains" :key="domain.id">
    <button v-confirm="{
            loader: true,
            ok: dialog => delete_domain(dialog, domain.id),
            cancel: doNothing,
            message: 'Domain will be deleted. Delete Domain Forever?'}"
            class="btn btn-danger btn-xs">delete</button>
</td>

Also, can you share the method delete_domain(dialog, domain.id) ?

EDITED

Ability to access the button attributes makes sense. I’ll find time to resolve this issue once and for all

0reactions
Godofbrowsercommented, Jul 19, 2018

Dialog now returns a node which is the element the directive was bound to. Please see the documentation for more details

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to pass parameter to function - Stack Overflow
I am trying to pass the value in the state as a parameter to the Function.addAddOnData to which calls the setaddOndatatypes function with ......
Read more >
Ways of passing data to functions in JavaScript
This is done by passing values in parenthesis: myFunction(myData). Even when there is no data to be passed, we still have to declare...
Read more >
Pass by reference (C++ only) - IBM
Pass-by-reference means to pass the reference of an argument in the calling function to the corresponding formal parameter of the called function.
Read more >
Function pass by value vs. pass by reference
Use pass by value when when you are only "using" the parameter for some computation, not changing it for the client program. In...
Read more >
Not able to pass parameter in azure function activity body ...
I am trying to pass parameter to azure function activity and I am getting error. This is the json. @concat{"{ "job_name": "job1",
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found