-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Provide a general summary of the issue here
I'm using Table component in my Remix js application. Table items are provided by the loader function.
Table sorting, search, pagination is handled with the URL query parameters.
When user interacting with the table sorting, pagination or search for some time, the table component randomly stop showing content and renders empty state fallback component instead.
I checked the items array, it contains data, but when I use React dev tools and check TableBody component, it shows that collection is empty, while props have items.
Here is my code
<Table onSortChange={handleSorting} sortDescriptor={getSortDescriptor()}>
<TableHeader columns={columns}>
{(column) => (
<Column isRowHeader={column.isRowHeader}>{column.name}</Column>
)}
</TableHeader>
<TableBody items={tableRows} renderEmptyState={() => "no results"}>
{(item) => (
<Row aria-label="Table Row" columns={customerTableColumns}>
{(column) => (
<Cell aria-label="Table Cell">{item[column.id]}</Cell>
)}
</Row>
)}
</TableBody>
</Table>
🤔 Expected Behavior?
Table should render items if provided.
😯 Current Behavior
Sometimes table does not render items.
💁 Possible Solution
Unfortunately I don't have solution.
🔦 Context
Items are dynamic, provided by the Remix loader with the help of useLoaderData hook.
🖥️ Steps to Reproduce
Unable to reproduce it in sandbox. Might be SSR related.
Version
1.1.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
Remix js
What operating system are you using?
Mac OS
🧢 Your Company/Team
Arbonics
🕷 Tracking Issue
No response