GeekyAnts / NativeBase

Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
https://nativebase.io/
MIT License
20.14k stars 2.38k forks source link

WARN "We can not support a function callback..." #5098

Open Brma1048 opened 2 years ago

Brma1048 commented 2 years ago

Description

We expected no console warning with minimal Checkbox.Group usage.

CodeSandbox/Snack link

no link

Steps to reproduce

export const CheckboxScreen = () => {
   const [values, setValues] = useState(['test']);

   return (
      <View>
         <Checkbox.Group onChange={v => setValues(v)} defaultValue={values}>
            <Checkbox value={'test'}>Test</Checkbox>
         </Checkbox.Group>
         <Text>{values}</Text>
      </View>
   );
};

NativeBase Version

3.4.7

Platform

Other Platform

No response

Additional Information

We are getting following warning "WARN We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320" when clicking the checkbox in the group. Without checkbox group there is no warning. Is this an issue or are we doing something wrong?

Versions:

Krithikj20 commented 2 years ago

Hi @Brma1048 , Thank you for reporting this issue. we will look into it.

pierrefrota commented 2 years ago

I have the same problem here

Hantex9 commented 2 years ago

Same problem here!

SohaibKtb commented 2 years ago

+1

alexdarh commented 2 years ago

+1

victoruramayo commented 2 years ago

+1

quintana0004 commented 2 years ago

Same issue!

jaboesch commented 2 years ago

+1

ErykDarnowski commented 2 years ago

Having the same issue on:

artomh commented 2 years ago

Same issue. react-native 0.68.2, native-base 3.4.9

For now will disable on-screen warning with: LogBox.ignoreLogs([ "We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320", ]);

thacherhussain commented 2 years ago

+1 -- React Native 0.69.2, native base 3.4.9

Klytoc commented 2 years ago

+1 --react native 0.68 native base 3.4.12

AlanSzuszkiewicz-RXO commented 1 year ago

+1 -- react native 0.69.5 native base 3.4.13

Shahzad6077 commented 1 year ago

I'm getting the same warning

+1 -- react native 0.69.5 native base 3.4.13

dnairns-arch commented 1 year ago

+1 -- react native 0.68.2 NativeBase 3.4.11

aleksamrakovic commented 1 year ago

+1 rn 0.70

Aichnerc commented 1 year ago

+1 -- react native 0.69.6 native base 3.4.16

Ryan-cyi commented 1 year ago

+1 react-native 0.70

ttessman commented 1 year ago

+1 react-native 0.69.4, native base ^3.4.13

roquib commented 1 year ago

+1 react-native 0.69.6, native base ^3.4.9

KokoTa commented 1 year ago

+1 react-native 0.70.1, native-base ^3.4.17

sluucke commented 1 year ago

+1 react native 0.69.6, native-base ^3.4.17

PerryRylance commented 1 year ago

Example from docs is broken because of this, manifesting as unexpected changes to the group state

PerryRylance commented 1 year ago

Having to source a third party checkbox because of a bug with a simple component, which has been around since June, or possibly longer. How utterly ridiculous is that?

3.4.17

jjjjonathan commented 1 year ago

+1 react-native 0.69.6, native-base ^3.4.19

guidoabelleira commented 1 year ago

+1 "react-native": "0.68.2" "native-base": "^3.4.6"

kebele commented 1 year ago

+1 nativebase 3.4.18 react-native 0.69.6

XavierVilaRubio commented 1 year ago

+1 "native-base": "^3.4.22", "react-native": "0.69.6"

aozfen commented 1 year ago

+1 "react": "18.0.0", "react-native": "0.69.4", "native-base": "^3.4.12"

anckaertv commented 1 year ago

+1 "react": "18.1.0", "react-native": "0.70.5", "native-base": "^3.4.6",

Salman9000 commented 1 year ago

+1 "react": "18.1.0", "react-native": "0.70.5", "native-base": "^3.4.6",

zahhaoui commented 1 year ago

+1 "react": "18.0.0", "react-native": "0.69.6", "native-base": "^3.2.2",

jkohlin commented 1 year ago

+1 "react": "18.1.0", "react-native": "0.70.5", "native-base": "^3.4.25",

OneHatRepo commented 1 year ago

+1 "react": "^18.2.0", "native-base": "^3.4.25",

Aichnerc commented 1 year ago

Any news? Still present and kinda annoying.

pd185197 commented 1 year ago

+1 "native-base": "3.4.9", "react": "17.0.2", "react-native": "0.68.2",

aarabmed commented 1 year ago

wow been 8 months and the issue still going

ekediala commented 1 year ago

+1 RN: 0.70.6 native base: 3.4.23

KaikySantos commented 1 year ago

Having the same issue on:

WynstelleID commented 1 year ago

+1

hosalnajam commented 1 year ago

1+

arjun-rawal commented 1 year ago

Having the same issue on:

Vekt0r11 commented 1 year ago

+1

JosephLu2022 commented 1 year ago

+1

jaminitaa commented 1 year ago

+1

bielpatricio commented 1 year ago

+1 "native-base": "^3.4.25", "react-native": "0.70.5",

CortiPum commented 1 year ago

+1

txtwiz commented 1 year ago

+1 "native-base": "^3.4.28", "react-native": "0.71.4",

MaganAnkur commented 1 year ago

I am facing the same issue in Switch component "native-base": "^3.4.12", "react-native": "0.71.1",

iway1 commented 1 year ago

I'm getting this issue with <Checkbox.Group/> without even passing a callback anywhere

the Checkbox.Groups value prop is not respected in the onChange callback (although what's rendered in the UI does respect the value prop).

this can be worked around by using the onChange of the individual checkboxes and the value of the group component (don't use onChange in the group)