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

Missing props and incorrect types #766

Open
ChromeQ opened this issue Oct 7, 2024 · 0 comments
Open

Missing props and incorrect types #766

ChromeQ opened this issue Oct 7, 2024 · 0 comments

Comments

@ChromeQ
Copy link

ChromeQ commented Oct 7, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

I noticed there are a few props not exposed to the main component and therefore cannot be used, and the onDirectionChanged actually has the wrong type. There may be others missing but these are the only 2 I used which I found to be missing.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-dropdown-picker/index.d.ts b/node_modules/react-native-dropdown-picker/index.d.ts
index 338c9de..e0cb98e 100644
--- a/node_modules/react-native-dropdown-picker/index.d.ts
+++ b/node_modules/react-native-dropdown-picker/index.d.ts
@@ -159,6 +159,7 @@ declare module 'react-native-dropdown-picker' {
     placeholder?: string;
     closeAfterSelecting?: boolean;
     labelProps?: TextProps;
+    itemLabelProps?: TextProps;
     disabled?: boolean;
     disabledStyle?: StyleProp<ViewStyle>;
     placeholderStyle?: StyleProp<TextStyle>;
@@ -261,7 +262,7 @@ declare module 'react-native-dropdown-picker' {
     onOpen?: () => void;
     onClose?: () => void;
     onChangeSearchText?: (text: string) => void;
-    onDirectionChanged?: (direction: DropDownDirectionType) => void;
+    onDirectionChanged?: (direction: 'top' | 'bottom') => void;
     zIndex?: number;
     zIndexInverse?: number;
     disableLocalSearch?: boolean;

This issue body was partially generated by patch-package.

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

1 participant