Nativebase: Warning: Failed child... type number, expected string (ActionSheet)

Created on 6 Feb 2018  路  8Comments  路  Source: GeekyAnts/NativeBase

react-native, react and native-base version

react-native 0.53
react 16.2.0
native-base 2.3.8

Expected behaviour

Work just fine without warnings (on Debug)

Actual behaviour

When activating the ActionSheet, the warning its displayed.

Steps to reproduce (code snippet or screenshot)

captura de pantalla 2018-02-06 a la s 11 31 50

Screenshot of emulator/device

Is the bug present in both ios and android or in any one of them?

both platforms. iOS AND android

Any other additional info which would help us debug the issue quicker.

On the ActionSheet.js file, the keyExtractor returns the index, but it should return it converted to string

            <FlatList
              style={{ marginHorizontal: -15, marginTop: 15 }}
              data={this.state.items}
              keyExtractor={(item, index) => index}

should look:

            <FlatList
              style={{ marginHorizontal: -15, marginTop: 15 }}
              data={this.state.items}
              keyExtractor={(item, index) => String(index) }
warning

Most helpful comment

Fixed with NB 2.3.10

All 8 comments

Fixed with 2.3.9

The same is happening on Picker in ios

We're experiencing this with the Picker on iOS, too.

The problem is unresolved on iOS in the Picker
"native-base": "2.3.9",
"react": "16.2.0",
"react-native": "0.53.3",

@flindenberg @CristiTr this will be fixed in upcoming release

@akhil-geekyants, that's great news. Thank you.

Fixed with NB 2.3.10

Thanks! I can confirm that this issue was resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aloifolia picture aloifolia  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

maphongba008 picture maphongba008  路  3Comments

kitsune7 picture kitsune7  路  3Comments

Landerson352 picture Landerson352  路  3Comments