Closed Whip closed 3 years ago
I don't even know why it works in rlv. it should not. there is a big chance that view might not be "findable". instead you need to use getViewForItemAtIndex
I can't find any documentation on this. Can you post a simple example?
you can look at the typings. yes the doc might not be full but the typings are always up to date
Okay I looked through your code and I see the function is used in there but I can't seem to get it to work. I tried
exports.onItemSelected = function(args){
const selectedItem = getViewForItemAtIndex(args.index);
const selectedItem = this.getViewForItemAtIndex(args.index);
}
Both don't work. I did spot that there's a view returned in the function, so I tried
console.log(args.view);
it returns the GridLayout. My code is a bit complicated than I posted above as an example. Its a GridLayout containing several items, one of those has the id on it which I need. I feel like I'm missing something basic but I'm not an expert on this. Could you post a basic example? I would highly appreciate it.
@Whip you re almost there. Now that you have the GridLayout
which is the cell holder, simply use the getViewById
you want on this GridLayout
then you ll get your view
Perfect. Thanks for your guidance.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
I'm trying to replace Radlistview with this plugin but I can't to this so I can't use it as of yet. Am I doing something wrong or is it a bug?