You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.
Hello MossP,
I'm glad you're finding swipeout handy! I think I may have a solution to your problem...
The scope of this is changed when containing it within a function (basically, this references this function, not the component). You can tie this to a variable so you reference it within your onPress function. For example:
/// define "self" as "this"
var self = this;
// use "self" in functions to retain scope
var Swipeoutbuttuns = [
{
text: "MyButton",
onPress: function(){ self.myFunction(rowData) },
}
];
Thanks for getting back to me. I hadn't thought of trying to assign a reference to "this" so that i could pass it down the chain. I'll try this out. Thank you :) and thanks again for the plugin :)
Firstly, this is amazing!! I love it, thank you! (been wanting to say that for a few days).
My question..
I can see that you can add a function inline by:
but what if I have a function already?
e.g.
I considered passing in a custom component but figure that I'll have the same issues as I can't passProps to it either?
The text was updated successfully, but these errors were encountered: