sohobloo / react-native-modal-dropdown

A react-native dropdown/picker/selector component for both Android & iOS.
MIT License
1.19k stars 478 forks source link

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

Open donni106 opened 4 years ago

donni106 commented 4 years ago

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: https://github.com/sohobloo/react-native-modal-dropdown/issues/247 Is this a blocker?

siemiatj commented 4 years ago

Looks like it. Will fix it later today.

nelsonprsousa commented 4 years ago

@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?

Bilal-Abdeen commented 4 years ago

@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 commented 4 years ago

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

donni106 commented 4 years ago

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.

donni106 commented 4 years ago

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 4 years ago

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.

siemiatj commented 4 years ago

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.

Amol-B-Patil commented 4 years ago

@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!

SrBrahma commented 4 years ago

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

djpetenice commented 4 years ago

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?

ngsayjoe commented 4 years ago

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

olehk-srs commented 4 years ago

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.

Kishanjvaghela commented 3 years ago

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

donni106 commented 3 years ago

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

kub1x commented 3 years ago

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

tim92109 commented 3 years ago

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

tim92109 commented 3 years ago

Please update the following components: %s, ModalDropdown

kub1x commented 3 years ago

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

tim92109 commented 3 years ago

@kub1x ok thx

siemiatj commented 3 years ago

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

tim92109 commented 3 years ago

Awesome @siemiatj ! Stoked to use it again

ghetinavlad commented 3 years ago

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

donni106 commented 3 years ago

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.

ghetinavlad commented 3 years ago

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.

HoangHieuHBR commented 9 months ago

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 ?