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

fix: Select container pressable functionality fixed. #4945

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oguzhnatly
Copy link

Summary

The action sheet does not open when the current select container is pressed. The only button that could be pressed was the dropdown icon. I fixed it by adding the onPressIn prop to its input to be able to open the action sheet.

Changelog

[General] [Fixed] - Pressable function added to Select's input as onPressIn.

Test Plan

It does not change the user interface.

@auto-assign auto-assign bot requested a review from surajahmed April 18, 2022 17:57
@vercel
Copy link

vercel bot commented Apr 18, 2022

@oguzhnatly is attempting to deploy a commit to the Geekyants Team Team on Vercel.

A member of the Team first needs to authorize it.

@surajahmed
Copy link
Collaborator

@oguzhnatly Thanks for working on this. We've already fixed this here ea38f62

@stale
Copy link

stale bot commented Jun 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 19, 2022
@dimaslz
Copy link

dimaslz commented Feb 10, 2023

@oguzhnatly Thanks for working on this. We've already fixed this here ea38f62

Hello @oguzhnatly, when is planned to release the next version to include that fix?, I am blocked now because on Android, the Select component works as InputText.

Thanks!

@jgudo
Copy link

jgudo commented Mar 28, 2023

Hello @oguzhnatly, when is planned to release the next version to include that fix?, I am blocked now because on Android, the Select component works as InputText.

Same issue. The Select component acts like Input which toggles the keyboard

@oguzhnatly
Copy link
Author

Hello @oguzhnatly, when is planned to release the next version to include that fix?, I am blocked now because on Android, the Select component works as InputText.

Same issue. The Select component acts like Input which toggles the keyboard

@oguzhnatly Thanks for working on this. We've already fixed this here ea38f62

Hello @oguzhnatly, when is planned to release the next version to include that fix?, I am blocked now because on Android, the Select component works as InputText.

Thanks!

Hi @jgudo ad @dimaslz, thank you for supporting my PR. However, I'm neither a reviewer, authorized to approve nor make approval for this in this NativeBase. Please contact with or tag @surajahmed!

@LuizCristino
Copy link

This commit ea38f62 didn't resolve the problem, at least for me, it didn't.

Had to change this line to make it work properly on Android.

      <Pressable
        onPress={() => {
          Keyboard.dismiss();
          setIsOpen(true);
          onOpen && onOpen();
        }}
        disabled={isDisabled}
        accessibilityLabel={accessibilityLabel}
        accessibilityRole="button"
        ref={mergeRefs([ref, _ref])}
+       pointerEvents='box-only'
        {...layoutProps}
      >

@enchorb
Copy link

enchorb commented May 16, 2023

This is still an issue on Android...pressing the Select input will open the keyboard and hide the bottom sheet.

@LuizCristino
Copy link

This is still an issue on Android...pressing the Select input will open the keyboard and hide the bottom sheet.

Try this fix with patch-package

diff --git a/node_modules/native-base/src/components/primitives/Select/Select.tsx b/node_modules/native-base/src/components/primitives/Select/Select.tsx
index ee8df1e..0647471 100644
--- a/node_modules/native-base/src/components/primitives/Select/Select.tsx
+++ b/node_modules/native-base/src/components/primitives/Select/Select.tsx
@@ -188,6 +188,7 @@ const Select = (
         accessibilityRole="button"
         ref={mergeRefs([ref, _ref])}
         {...layoutProps}
+        pointerEvents='box-only'
       >
         {commonInput}
       </Pressable>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants