Последние данные React Native Flatlist не видныAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Последние данные React Native Flatlist не видны

Сообщение Anonymous »

Я отображаю некоторые данные в плоском списке. Я не могу прокрутить все данные до нижнего конца. некоторые данные частично видны, как вы видите на скриншоте. Я не могу прокручивать дальше, а также добавил свой код.
Смотрите скриншот
Мой код:< /p>
`
экспортировать функцию по умолчанию Home() {

Код: Выделить всё

const [data, setData] = useState(
[
{
"id": 1,
"label": "This is the label for item 1.\nIt continues on the second line."
},
{
"id": 2,
"label": "This is the label for item 2.\nIt continues on the second line."
},
{
"id": 3,
"label": "This is the label for item 3.\nIt goes to the second line\nand even a third line."
},
{
"id": 4,
"label": "This is the label for item 4.\nSecond line."
},
{
"id": 5,
"label": "This is the label for item 5.\nSecond line\nThird line."
},
{
"id": 6,
"label": "This is the label for item 6.\nAnother second line."
},
{
"id": 7,
"label": "This is the label for item 7.\nSecond line, third line."
},
{
"id": 8,
"label": "This is the label for item 8.\nSecond line."
},
{
"id": 9,
"label": "This is the label for item 9.\nAnother second line."
},
{
"id": 10,
"label": "This is the label for item 10.\nAnd it continues\nonto a third line."
}
]
);

return (


 setNotes(text)}
/>


 handleAdd()} />
{notes.length > 0 &&  handleCancel()} />}


{data.length > 0 &&  item.id}
style={styles.messageListContainer}
initialNumToRender={data.length}
renderItem={(item) => (


 [
setIdSaver(item.item.id),
handleEdit(item.item.label)]}>

{item.item.label}



 handleRemove(item.item.id)} />



)}
ItemSeparatorComponent={() =>  }>
}


)
}
conststyles = StyleSheet.create({
screenContainer: {
padding: 10,
rowGap: 20
},
messageContainer: {
marginTop: 30,
},
messageList: {
paddingVertical: 10,
flexShrink : 1,
ширина: "100%"
},
messageListContainer: {
},
ввод: {
maxHeight: 100,
backgroundColor: "lightgrey"
},
listingContainer: {
display: "flex",
flexDirection: "row",
justifyContent: "space-between" ,
alignItems: "center",
пробел: 10,
},
сообщение: {
цвет: "черный",
},
/>разделитель: {
backgroundColor: «lightgrey»,
height: 1,
},
actionContainer: {
rowGap: 5,
},
})
`

Подробнее здесь: https://stackoverflow.com/questions/790 ... ot-visible
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»