akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.36k stars 958 forks source link

Input: unsupported configuration #1722

Open ribbonhood opened 1 year ago

ribbonhood commented 1 year ago

💬 Question

I'm getting the warnings below for different components after doing some expo updates from 45 to 47. Everything was working fine prior.

Input: unsupported configuration.
Check one of the following prop values: {
  "appearance": "default",
  "variants": [
    "large"
  ],
  "states": []
}
Input: unsupported configuration.
Check one of the following prop values: {
  "appearance": "default",
  "variants": [
    "primary"
  ],
  "states": [
    "disabled"
  ]
}

Versions I'm on that could possibly have an effect are

"@ui-kitten/eva-icons": "5.1.2"
"expo": "47.0.14",
"react": "18.1.0",
"react-native": "0.70.8",
"@types/react": "18.0.24",
"@types/react-native": "0.70.6",

UI Kitten and Eva version

Package Version
@eva-design/eva 2.0.0
@ui-kitten/components 5.1.2
sudhxnva commented 1 year ago

Facing the same issue

josmmv commented 1 year ago

Same here. I'm getting this warning

 WARN  Input: unsupported configuration.
Check one of the following prop values: {
  "appearance": "default",
  "variants": [
    "medium"
  ],
  "states": []
}
📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/components/input/api

and I don't have any of these properties defined in any Input component of my project

josmmv commented 1 year ago

I solved the warning. I had this:

<Input
  ...
  status={error?.message && 'danger'}
/>

and replaced that with this:

<Input
  ...
  {...(error?.message && { status: 'danger' })}
/>

and that worked.

R3DST0RM commented 1 year ago

Facing the exact same issue, while setting caption and status in a ternary.

<Input
  {...props}
  caption={hasCaption ? caption : undefined}
  status={hasStatus ? status : undefined}
/>

Note: Not using expo, it's a React Native CLI project.

"@eva-design/eva": "2.2.0", "@ui-kitten/components": "5.1.2", "@ui-kitten/eva-icons": "5.1.2", "react": "18.2.0", "react-native": "0.71.7",

ruida-shen commented 1 year ago

@R3DST0RM The fix for me was to replace undefined with 'basic'

<Input
  {...props}
  caption={hasCaption ? caption : undefined}
  status={hasStatus ? status : 'basic'}
/>
renatomserra commented 1 year ago

Was facing the same, Fixed by adding a default value to status too, also having equivalent error for Button component

On button it was the size that needed me to enforce a default

R3DST0RM commented 1 year ago

@R3DST0RM The fix for me was to replace undefined with 'basic'

<Input
  {...props}
  caption={hasCaption ? caption : undefined}
  status={hasStatus ? status : 'basic'}
/>

Thanks helped, though, I think the typing of string | undefined is then wrong for the status prop.

sergeushenecz commented 1 year ago

I have same waring. I think need allow pass null and undefined props