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

Updates `DeckSwiper` state when receiving new dataSource #966

merged 2 commits into from Jun 20, 2017


Copy link

@mu29 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.

@mu29 mu29 force-pushed the mu29:fix/refresh-deck-swiper branch 2 times, most recently from 9cda7e3 to 6022dde Jun 19, 2017
Copy link
Contributor Author

@mu29 mu29 commented Jun 19, 2017

Conflict fixed! @shivrajkumar

@shivrajkumar shivrajkumar self-assigned this Jun 19, 2017
Copy link

@shivrajkumar shivrajkumar commented Jun 20, 2017

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

Copy link
Contributor Author

@mu29 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
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
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.