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

Updates `DeckSwiper` state when receiving new dataSource #966

merged 2 commits into from Jun 20, 2017


None yet
2 participants

mu29 commented Jun 19, 2017


DeckSwiper did not update even though I put a new dataSource in it.


componentWillReceiveProps detects the length of a new data source and changes its state.


This comment has been minimized.


mu29 commented Jun 19, 2017

Conflict fixed! @shivrajkumar

@shivrajkumar shivrajkumar self-assigned this Jun 19, 2017


This comment has been minimized.


shivrajkumar commented Jun 20, 2017

@mu29 Could you also add use-case or code snippet for this. That will be helpfull


This comment has been minimized.


mu29 commented Jun 20, 2017


class TestComponent extends Component {


  render() {
          dataSource={ this.state.bookmarks }
          renderItem={ quiz => <Image source={ quiz.src } /> }
          <Button full onPress={ this.onDeleteBookmark } />

In earlier versions, calling onDeleteBookmark() on these components did not refresh DeckSwiper (even it injects a new dataSource props to DeckSwiper), so the deleted bookmark were remained on the top.

@shivrajkumar shivrajkumar merged commit f868356 into GeekyAnts:master Jun 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment