Skip to content

fix: export DropdownProps to improve TypeScript support #352

@Yahya10Shoaib

Description

@Yahya10Shoaib

Hi! 👋

I noticed that DropdownProps is defined but not exported. This makes it difficult to use TypeScript properly when creating reusable components. I resolved the issue locally using patch-package.

Here is the diff:

diff --git a/node_modules/react-native-element-dropdown/src/index.tsx b/node_modules/react-native-element-dropdown/src/index.tsx
index 9b363a6..3d9fde7 100644
--- a/node_modules/react-native-element-dropdown/src/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/index.tsx
@@ -1,7 +1,7 @@
import Dropdown from './components/Dropdown';
import MultiSelect from './components/MultiSelect';
import SelectCountry from './components/SelectCountry';
-import { IDropdownRef } from './components/Dropdown/model';
+import { IDropdownRef, DropdownProps } from './components/Dropdown/model';
import { IMultiSelectRef } from './components/MultiSelect/model';
import { ISelectCountryRef } from './components/SelectCountry/model';

@@ -12,4 +12,5 @@ export {
IDropdownRef,
IMultiSelectRef,
ISelectCountryRef,

  • DropdownProps,
    };

This small export allows consumers to strongly type their components without accessing internal paths. It would be great to have this included in the package.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions