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

Add Keyboard api facade #293

Merged
merged 3 commits into from
Sep 10, 2019

Conversation

zakpatterson
Copy link
Contributor

@zakpatterson zakpatterson commented Sep 9, 2019

Facades {Keyboard} from 'react-native'

With this patch, one can write something like the following, and get keyboard dismissing behavior when the user clicks in the background.

  def KeyboardDismissingView(mods: TagMod[Nothing]*) = TouchableHighlight(
    onPress = () => Keyboard.dismiss(),  // Keyboard.dismiss() added by this PR.
    style = literal(
      flex = 1,
    ),
  )(mods: _*)

Facades {Keyboard} from 'react-native'
Copy link
Owner

@shadaj shadaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @zakpatterson, this looks really great! Just one small change to the type definitions, but otherwise looks good to go!

Could you also add a line to the changelog for these changes?

native/src/main/scala/slinky/native/Keyboard.scala Outdated Show resolved Hide resolved
Copy link
Owner

@shadaj shadaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks again for the PR!

@shadaj shadaj merged commit aa93a74 into shadaj:master Sep 10, 2019
@zakpatterson
Copy link
Contributor Author

Thank you for this library and being open, helpful, and responsive to PRs. I hope to work on this a bunch. Thank you thank you.

@zakpatterson zakpatterson deleted the feature-add-keyboard-facade branch September 10, 2019 21:22
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

Successfully merging this pull request may close these issues.

2 participants