Giter Club home page Giter Club logo

Comments (18)

jackmino1223 avatar jackmino1223 commented on June 9, 2024 2

I want to disable KeyboardManager in specific screen but KeyboardManager.setEnable(false) doesn't work.
I've tested Sample Project but "Enable/Disable" switch doesn't work
I cannot find correct answer from above comments. Can you help me?

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

For toolbar, use:

KeyboardManager.setToolbarPreviousNextButtonEnable(true/false);

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

Thanks for your response .

KeyboardManager.setToolbarPreviousNextButtonEnable(true/false);

This don't work for me. In my case like below pickture:

screen shot 2018-01-03 at 10 42 58 am

My textfield don't need "Button Done". I try dismiss this but my App is crashed ...

Test case 1 (App crashed):
<Input onFocus={() => KeyboardManager.setEnable(true)} onBlur={() => KeyboardManager.setEnable(false) }/>

Test case 2(App crashed):
<Input onFocus={() => KeyboardManager.setEnableAutoToolbar(true)} onBlur={() => KeyboardManager.setEnableAutoToolbar(false) }/>

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

The picture did not load.

The "Done" button is directly related to "previous / next". It is not possible to hide the "Done" and show the "previous / next".

You should not enable it on onFocus / onBlur.

See the sample project.

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

I sorry for missing image and uploaded this.
In my case : I have a button "Next". So, The button "Done" is unnecessary thing

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

So you want to remove the entire toolbar?

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

yes, if it is possible?

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

Yes, is possible with KeyboardManager.setEnableAutoToolbar(false);.

But in current version you will lose also the React Native numeric keyboard toolbar. This is a problem because the numeric keyboard does not have the action button.

I fixed that in master branch, then if you want to try, use:

"dependencies": {
     "react-native-keyboard-manager": "git+https://github.com/douglasjunior/react-native-keyboard-manager.git#master"
}

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

Thanks for your response.

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

Let me know if it works for you, because I'm going to publish a new release.

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

Yes, setEnableAutoToolbar work for me. But setToolbarPreviousNextButtonEnable not working any more. I have linked the IQKeyboardManager resources to my Xcode project and I tested module like sample project.

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

I asked if you wanted to remove the toolbar, and you said yes.

Previous/Next button is part of the toolbar. So, if removes the toolbar, it removes de previous/next too.

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

Test case 1 :

setEnableAutoToolbar = true, setToolbarPreviousNextButtonEnable = true, setToolbarDoneBarButtonItemText = 'Done'

Expect result : The toolbar show 'Done' & 'PreviousNextButton
Real result : The toolbar show 'Done' ❗️

Test case 2 :

setEnable = false

Expect result : The toolbar hiden
Real result : The toolbar hiden ✅

Test case 3 :

setEnableAutoToolbar = true, setToolbarPreviousNextButtonEnable = false, setToolbarDoneBarButtonItemText = 'Done'

Expect result : The toolbar show 'Done' only
Real result : The toolbar show 'Done' only ✅

This is my expect result. This make module easy use in many case.

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

To show previous/next buttons you need to follow the Step 3 in README.

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

Yes, I have completed step 3 in README, but the setToolbarPreviousNextButtonEnable not working.

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

Is working on the Sample Project. Take a look.

from react-native-keyboard-manager.

leadmedev avatar leadmedev commented on June 9, 2024

The module working perfect. Thanks You .

from react-native-keyboard-manager.

douglasjunior avatar douglasjunior commented on June 9, 2024

How nice! you are welcome!

from react-native-keyboard-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.