react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

Picker prop 'migrate' warning despite not using it.

Open king960 opened this issue 1 year ago • 4 comments

Description

When creating a Picker and not using the 'migrate' flag, there's a warning about using the 'migration' prop. Probably wrong check, as passing migrate=false does not trigger the warning.

Related to

  • [x] Components
  • [ ] Demo
  • [ ] Docs
  • [ ] Typings

Steps to reproduce

Copy the code snippet and run. :)

Expected behavior

Using the 'migrate' flag with value either 'false' or 'true' triggers a warning.

Actual behavior

Not using the 'migrate' flag triggers the warning. Using the 'migrate' flag with value 'false' does not trigger the warning.

More Info

"react-native-ui-lib": "^7.23.2"

Code snippet

<Picker value={''} onChange={(value) => setTeam(value)} items={[{value: '1', label: 'one'}]} />



Screenshots/Video

Environment

  • React Native version:
  • React Native UI Lib version:

Affected platforms

  • [ ] Android
  • [x] iOS
  • [ ] Web

king960 avatar May 31 '24 09:05 king960

I can confirm this. I was searching for this usage, then realised they have this defaulted as true. Take a look at node_modules/react-native-ui-lib/src/components/picker/index.js line 70.

If you set it to false manually Picker won't work properly. Kind of annoying, but I guess they will get it done if the new version if fully prepared.

janoslc avatar Jun 03 '24 13:06 janoslc

Hi @king960 and @janoslc , The migrate prop will be deprecated in the next major version v8. I think we can close this issue, make sure to migrate your code and remove the usage of the migrate prop.

adids1221 avatar Aug 18 '24 12:08 adids1221

Hey @adids1221! Thank you for your response. We understood that migrate prop will be removed from the next major version. Our problem is that we don't use it, yet we get a warning as if we did. Therefore the issue is valid, of course it's not a blocker, but it shouldn't warn us if we don't use migrate.

janoslc avatar Aug 19 '24 12:08 janoslc

Thank you @adids1221 for your work! The ticket can be closed.

janoslc avatar Aug 30 '24 10:08 janoslc

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.

stale[bot] avatar Jan 31 '25 23:01 stale[bot]