sohobloo/react-native-modal-dropdown

This project is working but seems outdated. Which fork to use?

donni106 opened this issue ยท 26 comments

I found different forks in the issues here and I ask myself, which one to use. All seems to have implemented the FlatList instead of ListView to address certain problems.

  1. @riyga25 https://github.com/riyga25/react-native-modal-dropdown
  2. @marshallshen https://github.com/BuildU/react-native-modal-dropdown
  3. @siemiatj https://github.com/siemiatj/react-native-modal-dropdown

3 seems to be mostly updated. 2 seems to be more up to date than 1.
From this point of view, I would go with @siemiatj's version?

There is an open issue, created one month ago: #247 Is this a blocker?

Looks like it. Will fix it later today.

@siemiatj Perhaps it's better to create a new repo and not a fork, since it's not possible to open issues there.

Also, I am not able to run the example. Is it possible to upgrade the example to 0.62.2?

@donni106 Thanks for the list.
@siemiatj Thanks for this version. It works.

Everyone, I being a newbie, it wasn't easy for me to install a PR. This is how to install @siemiatj's version:
npm install --save https://github.com/siemiatj/react-native-modal-dropdown

@siemiatj Perhaps it's better to create a new repo and not a fork, since it's not possible to open issues there.

Also, I am not able to run the example. Is it possible to upgrade the example to 0.62.2?

Created a clone repo (same url) and will use that from now on.

Thanks @siemiatj. And you kept the old fork for history here: https://github.com/siemiatj/react-native-modal-dropdown-legacy

I will create an issue in the new one.

We should change the conencted repository on npm packages to @siemiatj's one.
It would be easier to install and other people will find the updated repository faster.
Has anybody expericence with npm registry? Is this even possible to contact them to change a package repository?
Current here: https://www.npmjs.com/package/react-native-modal-dropdown

kub1x commented

We should change the conencted repository on npm packages to @siemiatj's one.
It would be easier to install and other people will find the updated repository faster.
Has anybody expericence with npm registry? Is this even possible to contact them to change a package repository?
Current here: https://www.npmjs.com/package/react-native-modal-dropdown

I believe repository is simply taken from repository field of package.json once you npm publish it. Also there can't be two packages of the same name. I thing what you're asking for is @sohobloo to either remove the package from npm (so it can be published by @siemiatj), or somehow hand it over. Or @siemiatj can rename it, making it effectively a new npm package.

Edit: Found more on taking over packages here: https://wlach.github.io/blog/2017/07/taking-over-an-npm-package-sanity-prevails/ it might be a matter of one email.

I think it'd be easiest to just create a new npm package as @sohobloo seems to have abandoned this ship. But I'll try to reach out to both him and npm first.

@Bilal-Abdeen Thanks a lot for suggestion. It works!
@siemiatj Thanks a lot for this version. Please maintain this version.

I added it in my project and it works! Thanks a lot!

Thanks, @siemiatj . If you can't update this package by contacting npm, you really should upload your version as a new package.

I've just upgraded my app to RN 0.63.2 and added the @siemiatj version - all works apart from nothing happens when I select a row - any ideas what's causing that?

@siemiatj Updating the dropdown options dynamically shows loading icon instead of the updated options.

I've just upgraded my app to RN 0.63.2 and added the @siemiatj version - all works apart from nothing happens when I select a row - any ideas what's causing that?

Had the same problem.

I removed TouchableOpacity that was wrapping my component passed to renderRow prop.

Try this, added support for right component / dropdown icon and full width
https://github.com/Kishanjvaghela/react-native-modal-dropdown

@Kishanjvaghela do you want to provide your new features as PR to https://github.com/siemiatj/react-native-modal-dropdown?

kub1x commented

@siemiatj any news about the npm package? It feels like it's time to move on. Not trying to push, just showing interest for this thing to be sorted out.

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

Please update the following components: %s, ModalDropdown

kub1x commented

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
Please update the following components: %s, ModalDropdown

@tim92109 Please read the comments (or the topic of the discussion you are posting to) first. This project is outdated. Most actively maintained fork can be found here: https://github.com/siemiatj/react-native-modal-dropdown

@kub1x ok thx

Just wanted to let you know that I successfully took over the npm package and published a new version under the same name.

Awesome @siemiatj ! Stoked to use it again

Hello guys, is there any way I can know which option is selected at a given moment ? I've been struggling , haven't figured it out yet

Hello guys, is there any way I can know which option is selected at a given moment ? I've been struggling , haven't figured it out yet

You can use the onSelect prop and pass a method, for example a setter for a state variable, that you can use elsewhere. Please have a look at the examples, where you can find usages in dropdown_4, dropdown_5 and dropdown_6. Hope that helps.

Hello guys, is there any way I can know which option is selected at a given moment ? I've been struggling , haven't figured it out yet

You can use the onSelect prop and pass a method, for example a setter for a state variable, that you can use elsewhere. Please have a look at the examples, where you can find usages in dropdown_4, dropdown_5 and dropdown_6. Hope that helps.

Thanks for the help, got it.

Anyone here now ? Why I can't add Icon into input field in spite of I have used renderRightComponent like this
image

Can anyone help me to solve this problem ?