question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: add ListEmptyComponent to List

See original GitHub issue

I use the List component a lot, because it’s easier to specify ListItems than specify a datasource on RN List implementations. However, I am really missing ListEmptyComponent on List.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kbrandwijkcommented, Dec 8, 2017

That’s exactly what I meant. If it’s okay with you, I think this should be closed.

1reaction
iRoachiecommented, Dec 8, 2017

Hey @kbrandwijk the List component for react-native-elements is just an wrapper View around your content, so it doesn’t actually have any props that affect the List itself. Instead you can use the FlatList component from react-native and place it inside our List. You can then use the ListEmptyComponent prop on FlatList.

Here’s an example snack you can see https://snack.expo.io/B1J4Qvwbf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Showing list empty message at the center of the screen in a ...
I am using React-Native version 0.43.0 which does not support ListEmptyComponent of FlatList. Hence I am using ...
Read more >
Display a List Using the FlatList Component in React Native
ListEmptyComponent is used to display an empty view while the data is being downloaded. ListHeaderComponent is used to add a header component ...
Read more >
React Native Show Message for empty Flat List Example - Snack
Example to show message for empty React Native FlatList.
Read more >
SectionList · React Native
A performant interface for rendering sectioned lists, supporting the most handy features: Fully cross-platform. Configurable viewability callbacks.
Read more >
A deep dive into React Native FlatList - LogRocket Blog
It is a React Native component that allows you to render lists with zero ... This will make a GET request to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found