import { injectable } from '@servicetitan/react-ioc'; import { InMemoryDataSource, TableState } from '../..'; import { Product } from '../overview/product'; import { products } from '../overview/products'; @injectable() export class RowDetailsTableStore { tableState = new TableState({ dataSource: this.getDataSource(), rowDetailsExpandState: 'expanded', pageSize: 5, }); private getDataSource() { return new InMemoryDataSource(products, this.idSelector); } private idSelector(row: Product) { return row.ProductID; } }