wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.44k stars 706 forks source link

Picker missing props #2250

Closed LazyAfternoons closed 1 year ago

LazyAfternoons commented 2 years ago

Description

Since the last version, TypeScript shows an error regarding the Picker component: Type '{ children: Element[]; migrateTextField: true; showSearch: boolean; value: selecteDate; onChange: (value: selecteDate) => void; placeholder: string; placeholderTextColor: string; fieldStyle: { ...; }; containerStyle: { ...; }; }' is missing the following properties from type 'Pick<any, "value" | "onChange" | "renderExpandableInput" | "renderExpandable" | "onToggleExpandableModal" | "topBarProps" | "rightButtonProps" | "color" | "containerStyle" | ... 436 more ... | "pickerModalProps">': renderExpandableInput, renderExpandable, onToggleExpandableModal, topBarProps, and 433 more.ts(2740)

Related to

Environment

chrdevmar commented 2 years ago

also experiencing this, tried to solve by creating our own wrapped Picker which overrode types with Partial<originalProps> but was a pain. ended up downgrading react-native-ui-lib to 6.20.4 to solve typescript errors for now.

Environment (looks like you've got yours around the wrong way btw):

LazyAfternoons commented 2 years ago

also experiencing this, tried to solve by creating our own wrapped Picker which overrode types with Partial<originalProps> but was a pain. ended up downgrading react-native-ui-lib to 6.20.4 to solve typescript errors for now.

Environment (looks like you've got yours around the wrong way btw):

  • React Native UI Lib version: 6.21.0
  • React Native version: 0.69.5

Thank you for confirming this issue. Environment fixed, thanks.

stale[bot] commented 1 year ago

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.

MiguelAraCo commented 1 year ago

Also experiencing this. The latest version (6.23.0) doesn't seem to fix the issue.

The-White-Fang commented 1 year ago

6.23.1 seems broken as well. In my case I am seeing Dialog infered as const Dialog: React.ComponentClass<any, any> & typeof Dialog. Is there a quick fix for it?

lewisd1996 commented 1 year ago

Also getting this error, says i need to define all 400+ props

The-White-Fang commented 1 year ago

Can you show some SS or error/warning text?

lewisd1996 commented 1 year ago

@The-White-Fang sorry I should of been clearer, I have the exact same error as @LazyAfternoons.

I have provided the usual basic props, value, onChange etc.

The TS error says I am missing the other 450+ props, same as OP

robpearmain commented 1 year ago

I am getting this error too

"react-native-ui-lib": "^6.24.0", and

"react-native-ui-lib": "^6.25.0",

boonook commented 1 year ago

I am getting this error too

"react-native-ui-lib": "^6.27.1",

chrisdrifte commented 1 year ago

Still getting this error "react-native-ui-lib": "^7.2.0",