Skip to content

Multiple tables

Give each table a distinct name in the Laravel response:

return Inertia::render('Dashboard', [
UsersTable::make('active_users')->data($activeUsers),
UsersTable::make('invited_users')->data($invitedUsers),
]);

Reuse one table class or use different classes when the definitions differ.

import { InertiaX } from '@inertiax/react-inertia';
export default function Dashboard() {
return (
<>
<h2>Active users</h2>
<InertiaX prop="active_users" />
<h2>Invited users</h2>
<InertiaX prop="invited_users" />
</>
);
}

Both use the application provider from Installation. Each table has its own URL parameters and partial reloads. Do not reuse an ID for two instances on the same page.