Skip to main content

A real data table for Expo apps.

Sorting, filters, search, pagination, and selection in one typed component. Stop rebuilding a table on top of a list.

Platforms
iOS, Android
Expo SDK
55 – 57
Lists
FlashList 2
License
MIT
OrdersScreen.tsx
import { DataGrid, type ColumnDef } from 'expo-flash-datagrid';

type Order = { id: string; customer: string; total: number; placedAt: string };

const columns: ColumnDef<Order>[] = [
{ field: 'customer', headerName: 'Customer', flex: 1 },
{ field: 'total', headerName: 'Total', type: 'number', width: 110 },
{ field: 'placedAt', headerName: 'Placed', type: 'date', width: 130 },
];

export function OrdersScreen({ orders }: { orders: Order[] }) {
return (
<DataGrid<Order>
mode="client"
rows={orders}
columns={columns}
enableMultiSort
checkboxSelection
style={{ flex: 1 }}
/>
);
}

One prop decides who does the work.

Keep the full dataset on the device, send every query to your API, or mix the two.

All rows are on the device. The grid does the rest.

StepDone by
FilterGrid
SearchGrid
SortGrid
PaginateGrid
<DataGrid<User>
mode="client"
rows={rows}
columns={columns}
/>

What you stop building

CapabilityWhat the grid handlesMain props
SortingSingle or multi-column, with custom comparatorssortModel, enableMultiSort
FilteringOperators and inputs matched to each column typefilterModel, maxFilters
SearchDebounced across every searchable columnsearchText, searchDebounceMs
PaginationFooter controls with page sizespaginationModel, rowCount
Infinite scrollLoad more as people reach the endinfinite, onEndReached
SelectionCheckboxes or long press, tracked by row IDselectionModel, checkboxSelection
Row actionsLong-press menus and actions columnsrowActions, rowActionMenuTrigger
Column visibilityA built-in menu to show and hide columnscolumnVisibilityModel
ThemingOverride colors, sizes, and row stylestheme, getRowStyle, zebraRows
LocalizationEnglish and Portuguese, with overrideslocale, localeText

Typed from row to callback.

ColumnDef<TRow> carries your row type into formatters, cell renderers, comparators, and row actions.

ColumnDef reference
import { Text } from 'react-native';
import type { ColumnDef } from 'expo-flash-datagrid';

type Invoice = {
id: string;
amount: number;
paid: boolean;
};

export const columns: ColumnDef<Invoice>[] = [
{
field: 'amount',
headerName: 'Amount',
type: 'number',
valueFormatter: (value, row) =>
`${row.paid ? 'Paid' : 'Due'}: $${value}`,
},
{
field: 'paid',
headerName: 'Status',
type: 'boolean',
renderCell: ({ row, isSelected }) => (
<Text
style={{ fontWeight: isSelected ? '700' : '400' }}
>
{row.paid ? 'Settled' : 'Open'}
</Text>
),
},
];

Rendered with FlashList.

On iOS, rows render through FlashList by default. On Android the default is FlatList, and one prop switches it.

listModeiOSAndroid
autoFlashListFlatList
flash-listFlashListFlashList
flat-listFlatListFlatList
Choosing a list engine
import {
applyClientPipeline,
getPaginationRange,
} from 'expo-flash-datagrid';

import { initialQuery, userColumns, users } from '../data';

const { sortedRows, paginatedRows } = applyClientPipeline({
...initialQuery,
rows: users,
columns: userColumns,
searchText: 'recife',
});

export const page = paginatedRows;
export const range = getPaginationRange(
sortedRows.length,
initialQuery.paginationModel
);

Keep the logic, skip the component.

The sort, filter, search, and pagination steps are exported as pure functions. Use them in adapters, tests, or a mock API.

Utilities reference

Install it.

npm install expo-flash-datagrid @shopify/flash-list react-native-safe-area-context @expo/vector-icons @react-native-community/datetimepicker expo expo-font

Wrap your app in SafeAreaProvider, then build your first grid.