'TextInput problem Attempt to Invoke virtual method 'boolean abi44.com facebook has State manager
I want to add in my listHeaderComponent a TextInput, but when I add this then I get this error:
When I remove the textInput, then I get no error and it works...
Code:
...
function Header() {
return (
<View style={s.header}>
<Text style={s.headerTitle}>{t('packet.multiple_send_title')}</Text>
<TextInput value={value} onChangeText={(e) => setValue(e)} />
<Button onPress={handleSendMessages} disabled={selectedUsers.length > 0 ? false : true} style={[ButtonStyles.full, s.btnSend]}>
<Text style={s.btnSendText}>{t('packet.multiple_button_send')}</Text>
</Button>
</View>)
}
return (
<Modalize
ref={ref}
modalStyle={{ flexGrow: 1, padding: 8 }}
flatListProps={{
data: newArr(),
style: {
padding: 0,
flexGrow: 1
},
renderItem: renderItem,
ListEmptyComponent: ShowTextWhenArrayIsEmpty,
ListHeaderComponent: Header,
keyExtractor: (item, i) => i.toString(),
showsVerticalScrollIndicator: false,
stickyHeaderIndices: [0],
scrollEventThrottle: 16,
maxToRenderPerBatch: 2,
keyboardShouldPersistTaps: 'handled',
initialNumToRender: 4,
updateCellsBatchingPeriod: 200,
}}
/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|