diff --git a/apps/backtest-report/components/OrderListTable.tsx b/apps/backtest-report/components/OrderListTable.tsx index efaa0d721..4e075b490 100644 --- a/apps/backtest-report/components/OrderListTable.tsx +++ b/apps/backtest-report/components/OrderListTable.tsx @@ -1,15 +1,19 @@ -import {Checkbox, Group, Table} from "@mantine/core"; +import {Button, Checkbox, Group, Table} from "@mantine/core"; import React, {useState} from "react"; import {Order} from "../types"; +import moment from "moment"; interface OrderListTableProps { orders: Order[]; onClick?: (order: Order) => void; + limit?: number; } const OrderListTable = (props: OrderListTableProps) => { let orders = props.orders; + const [showCanceledOrders, setShowCanceledOrders] = useState(false); + const [limit, setLimit] = useState(props.limit || 100); if (!showCanceledOrders) { orders = orders.filter((order: Order) => { @@ -17,6 +21,10 @@ const OrderListTable = (props: OrderListTableProps) => { }) } + if (orders.length > limit) { + orders = orders.slice(0, limit) + } + const rows = orders.map((order: Order) => (
Order ID | -Symbol | -Side | -Order Type | -Price | -Quantity | -Status | -Creation Time | -
---|