Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CoPilot in a FlatList #8

Closed
iCueto opened this issue Jan 7, 2018 · 2 comments
Closed

Use CoPilot in a FlatList #8

iCueto opened this issue Jan 7, 2018 · 2 comments

Comments

@iCueto
Copy link

iCueto commented Jan 7, 2018

Hello, I wish to use copilot on a ListItem in FlatList, and I think that if I used it, the steps will be repeated in all ListItems when the FlatList Render... Someone, have a Idea how to used it in a FlatList?

Thanks!!

@mohebifar
Copy link
Owner

I assume you want a copilot step only for one of the FlatList items and not for all. If that's the case, you should be able to manually make one of the items, a copilot step.

renderItem = ({ index, item }) => {
  if (index === 0) {
    // Render copilot step
  } else {
    // Render without copilot
  }
}

@iCueto
Copy link
Author

iCueto commented Jan 19, 2018

Ohhh, Thank you! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants