We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
[email protected]
to make it generic.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-select-dropdown/index.d.ts b/node_modules/react-native-select-dropdown/index.d.ts index f5c89c4..bc00448 100644 --- a/node_modules/react-native-select-dropdown/index.d.ts +++ b/node_modules/react-native-select-dropdown/index.d.ts @@ -2,27 +2,27 @@ import type * as React from 'react'; import {StyleProp, ViewStyle, TextStyle} from 'react-native'; declare module 'react-native-select-dropdown' { - export type SelectDropdownProps = { + export type SelectDropdownProps<T> = { /** * array of data that will be represented in dropdown, can be array of objects */ - data: Array<any>; + data: Array<T>; /** * function recieves selected item and its index in data array */ - onSelect: (selectedItem: any, index: number) => void; + onSelect: (selectedItem: T, index: number) => void; /** * function returns React component for the dropdown button */ - renderButton: (selectedItem: any, isOpened: boolean) => React.ReactNode; + renderButton: (selectedItem: T, isOpened: boolean) => React.ReactNode; /** * function returns React component for each dropdown item */ - renderItem: (selectedItem: any, index: number, isSelected: boolean) => React.ReactNode; + renderItem: (selectedItem: T, index: number, isSelected: boolean) => React.ReactNode; /** * default selected item in dropdown */ - defaultValue?: any; + defaultValue?: T; /** * default selected item index */ @@ -102,14 +102,14 @@ declare module 'react-native-select-dropdown' { /** * function returns React component for search input icon */ - renderSearchInputLeftIcon?: (selectedItem: any, index: number) => React.ReactNode; + renderSearchInputLeftIcon?: (selectedItem: T, index: number) => React.ReactNode; /** * function returns React component for search input icon */ - renderSearchInputRightIcon?: (selectedItem: any, index: number) => React.ReactNode; + renderSearchInputRightIcon?: (selectedItem: T, index: number) => React.ReactNode; }; - export default class SelectDropdown extends React.Component<SelectDropdownProps> { + export default class SelectDropdown<T> extends React.Component<SelectDropdownProps<T>> { /** * Remove selection & reset it */
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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.to make it generic.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: