react-native-modals icon indicating copy to clipboard operation
react-native-modals copied to clipboard

Warning: Failed prop type: Invalid prop `children` of type `object` supplied to `DialogActionList`, expected an array.

Open saidhappy010 opened this issue 5 years ago • 4 comments

I am using "react-native-popup-dialog", it is really great, but there is a warning that appears on terminal

Warning: Failed prop type: Invalid prop children of type object supplied to DialogActionList, expected an array.

what I noticed is that when I use DialogFooter with 2 children, the warning does not appear, but with one child the warning appears. like that

      <Dialog
        visible={visible}
        dialogTitle={<DialogTitle title="Confirmation" />}
        footer={
          <DialogFooter>
            <DialogButton textStyle={{fontSize:20, color:'green'} } text="Next" />
          </DialogFooter>
        }
      >

please, how to fix this problem?

saidhappy010 avatar Feb 17 '20 16:02 saidhappy010

having the same

shemilhashan avatar Aug 06 '20 21:08 shemilhashan

I too wanted only one DialogFooter but was receiving the error, so I just added a blank <></> and the error disappeared! Strange

yogesh-dalvi avatar Dec 09 '20 08:12 yogesh-dalvi

I too wanted only one DialogFooter but was receiving the error, so I just added a blank <></> and the error disappeared! Strange

where to added "<></>"?

xkungfu avatar Dec 19 '20 12:12 xkungfu

I too wanted only one DialogFooter but was receiving the error, so I just added a blank <></> and the error disappeared! Strange

where to added "<></>"?

For eg:-

<DialogFooter bordered={false} style={{ marginTop: -15 * ratio }}> <DialogButton text="CANCEL" onPress={() => props.handleCancelClick()} textStyle={{ fontSize: RFValue(dijoriTheme.SIZES.FORTEENPT), fontFamily: "Raleway-Medium" }} align="right" /> <></> </DialogFooter>

yogesh-dalvi avatar Dec 21 '20 09:12 yogesh-dalvi