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

code need update with last react version #27

Closed
alainib opened this issue Mar 12, 2018 · 6 comments
Closed

code need update with last react version #27

alainib opened this issue Mar 12, 2018 · 6 comments

Comments

@alainib
Copy link

alainib commented Mar 12, 2018

Hello
I'm testing this repo with your example files.
with last react version code need fix :


AlphabetPicker.js

from
import React, { Component, PropTypes } from 'react';
To
import React, { Component } from 'react'; import PropTypes from "prop-types";


AtoZlist.js

from
import React, { Component, PropTypes } from 'react';
To
import React, { Component } from 'react'; import PropTypes from "prop-types";


FixedHeightWindowedListView.js

add import PropTypes from "prop-types";

line 184 from
this.scrollRef.scrollWithoutAnimationTo(startY); // this.scrollRef.scrollTo({x: 0, y: startY, animation: false});
to

//this.scrollRef.scrollWithoutAnimationTo(startY);
this.scrollRef.scrollTo({x: 0, y: startY, animation: false});

line 374
from

FixedHeightWindowedListView.propTypes = { dataSource: React.PropTypes.object.isRequired, renderCell: React.PropTypes.func.isRequired, renderSectionHeader: React.PropTypes.func, incrementDelay: React.PropTypes.number, initialNumToRender: React.PropTypes.number, maxNumToRender: React.PropTypes.number, numToRenderAhead: React.PropTypes.number, numToRenderBehind: React.PropTypes.number, pageSize: React.PropTypes.number, };

to
FixedHeightWindowedListView.propTypes = { dataSource: PropTypes.object.isRequired, renderCell: PropTypes.func.isRequired, renderSectionHeader: PropTypes.func, incrementDelay: PropTypes.number, initialNumToRender: PropTypes.number, maxNumToRender: PropTypes.number, numToRenderAhead: PropTypes.number, numToRenderBehind: PropTypes.number, pageSize: PropTypes.number, };

@rgovindji
Copy link
Owner

Make a PR and I'll update the package

@alainib
Copy link
Author

alainib commented Mar 12, 2018

the code from npm is different from the github code.

for example the import is already fixed in AlphabetPicker.js in github but not on the npm version

@siddhisuthar
Copy link

@rgovindji , can you push the updated code to npm registry and make a new release?

@kamleshnarola
Copy link

Thank you @alainib for pointing this issue out.Facing the same issue while using react-native-atoz-list as well as react-native-alphabetlistview. I am new to react-native and stuck around it from a long time.Didn't knew what the issue was though. Thank god you opened the issue.
@rgovindji This looks like a great library to be integrate with any project.It will be really great if you can fix it as soon as possible.Thanks in Advance.

@rgovindji
Copy link
Owner

Yeah I can push a new version to NPM today

@rgovindji
Copy link
Owner

Please check NPM for 1.0.3 now

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

4 participants