Node Table

Pre-configured table component for displaying simulation nodes

Live Example

Nodes Table

Browse nodes with names, coordinates, and types. Click a row to see the data.

Loading...

NodeTable

A ready-to-use table component for displaying simulation nodes with location and type information.

Usage

Display simulation nodes in a table with filtering and sorting capabilities.

import { useSGERP } from 'sgerp-frontend-lib';
import { NodeTable } from '@/components/sgerp/tables/node-table';

function MyComponent() {
  const api = useSGERP();
  
  return (
    <NodeTable 
      collection={api?.collections.node ?? null}
      onRowClick={(row) => console.log('Clicked:', row)}
    />
  );
}

Features

  • Columns: ID, Name, Latitude, Longitude, Type, Simulation ID, Booking ID, Created date
  • Filters: Name (text), Type (text), Simulation ID (number)
  • Sorting: ID, Name, Type, Simulation ID, Booking ID, Created date
  • Default Sort: -id (newest first)
  • Page Size: 20 items per page

Props

PropTypeRequiredDescription
collectionNodeCollection | nullYesThe node collection to display
onRowClick(row: Node) => voidNoCallback when a row is clicked

Column Details

Latitude / Longitude

Geographic coordinates displayed with 6 decimal places for precision.

Type

Node type (e.g., pickup, dropoff, waypoint).

Filtering

  • Name: Case-insensitive text search (name__icontains)
  • Type: Exact match filter for node type
  • Simulation ID: Numeric filter for specific simulation