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

keyboardShouldPersisTaps={true} is deprecated, use keyboardShouldPersisTaps="always" instead #58

Open
jaspal747 opened this issue Jun 14, 2017 · 8 comments

Comments

@jaspal747
Copy link

Getting the warning: "keyboardShouldPersisTaps={true} is deprecated, use keyboardShouldPersisTaps="always" instead"

react-native: "0.44.0"
react-native-modal-picker: "0.0.16"

Thanks a lot for this awesome plugin 👍

@mikaello
Copy link

mikaello commented Jun 16, 2017

As I wrote in another issue, this issue has four open PRs (#32, #40, #49, #52) that all does the same thing: appends ="always" to the keyboardShouldPersistTaps-prop in ScrollView on line 134. It also exists numerous issues pointing out this problem.

But since this repo is no longer maintained, you are better of forking it yourself and applying the PR-s that looks good, or use one of the 119 forks that already exists (many of them have done good progress).

UPDATE: Use react-native-modal-selector, it has implemented the fix for this, and will implement any future fixes as well

@jaspal747
Copy link
Author

Thanks @mikaello for your reply! Using one of the updated forks now.

@peacechen
Copy link

peacechen commented Jul 19, 2017

It would be better to allow the parent to pass the prop keyboardShouldPersistTaps to this component. This would not only allow backward compatibility with older versions of RN, but also allow current RN users to choose the different values for keyboardShouldPersistTaps: always, handled, never.

@peacechen
Copy link

PR #62 adds prop keyboardShouldPersistTaps to react-native-modal-picker. It defaults to 'always' but allows the caller to override the prop in order to support any version of RN.

Until dan merges, you can use my fork with this commit:

  "dependencies": {
    "react-native-modal-picker": "https://github.com/peacechen/react-native-modal-picker#keyboardShouldPersistTaps_prop",
  },

That also includes PR #37

@NhatAnh
Copy link

NhatAnh commented Jul 23, 2017

@peacechen Thanks, but using your PR throws me a warning from yarn: Warning: Installed version 0.0.16 of 'react-native-modal-picker' does not satisfy required version peacechen/react-native-modal-picker#keyboardShouldPersistTaps_prop
Do you know how to fix that?

@peacechen
Copy link

peacechen commented Jul 24, 2017

@NhatAnh you should be able to ignore that warning. Looks like a problem with the parsing of the version from package.json if the url has a # to select a branch.

Someone else reported the same warning on yarn:
yarnpkg/yarn#3964

@davidroman0O
Copy link

Thx for this issue, i was searching for a solution too. :)

@peacechen
Copy link

You may want to try react-native-modal-selector which is the official continuation of this abandoned project.

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

5 participants