-
Notifications
You must be signed in to change notification settings - Fork 16
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: replaces useDropdowns by useClickOutside #883
fix: replaces useDropdowns by useClickOutside #883
Conversation
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
App.tsx
Outdated
@@ -114,7 +114,7 @@ export default function App() { | |||
</SearchBarContextProvider> | |||
</WalletControlContextProvider> | |||
</WalletsProvider> | |||
</DropdownsContextProvider> | |||
</ClickOutsideProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "DropdownsClickOutsideProvider"; maybe is too long, but I feel that with the new name the original intent "Dropdown" got lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the idea, yes I agree we can achieve new changes without renames.
I can use:
ClickOutsideProvider -> DropdownsProvider
useClickOutside -> useDropdowns
So, we will have naming conventions as before, and it will be easier for devs to use this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep totally agree with that too 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Else found that good 👍 Thanks for that 👍
packages/components/nfts/NFTView.tsx
Outdated
@@ -118,10 +114,10 @@ export const NFTView: React.FC<{ | |||
|
|||
const NFTViewContent: React.FC<{ | |||
nft: NFT; | |||
dropdownRef: RefObject<View>; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is empty right ? If you can delete it 👍
d255348
to
c008a09
Compare
c008a09
to
e108ed3
Compare
Problem:
Due to the use of Pressable on
DropdownsContextProvider
, it blocks scroll ofScrollView
on mobile app (Android & iOS)Solution:
Replace
useDropdowns
by react-native-click-outside