Closed JulianKingman closed 6 years ago
Thanks for your contribution @JulianKingman! The horizontal scrolling is great. Unfortunately we can't merge this as is, as internally we need to use the Realm ListView for optimisations like lazy loading data into the table. If you can work on creating a dependency injection setup it would be much appreciated, otherwise we will leave this sitting open until one of us gets a chance.
I'm not sure if this is the right way to do it, but I added a listViewComponent
prop to DataTable where you can pass in any ListView you like.
<DataTable
dataSource={listviewData}
listViewComponent={RealmListView}
style={style.table}
scrollable={scrollable}
...
/>
Thanks, I reckon that'll work just fine. Will test and merge when we find time.
By the way, if you're interested in this component, you might want to check out https://github.com/sussol/react-native-generic-table-page for a view that has this table integrated with a search bar and some sensible defaults.
I'm suddenly feeling the burden of not having automated tests...
Ancient.
At least it would be a good step forward, but ListView is well deprecated now anyway.
scrollable
prop to DataTable, allowing horizontal scrolling for tables that are too widearrowStyle
to HeaderCell, to style arrows