From a33662e6f0dddbb97075391970886e4d6d205d0b Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 13 Mar 2024 12:04:45 -0700 Subject: [PATCH] IO-2630 Adjust for oRow selection Signed-off-by: Allan Carr --- .../parts-queue.list.component.jsx | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/client/src/components/parts-queue-list/parts-queue.list.component.jsx b/client/src/components/parts-queue-list/parts-queue.list.component.jsx index 44d5368ce..511cade62 100644 --- a/client/src/components/parts-queue-list/parts-queue.list.component.jsx +++ b/client/src/components/parts-queue-list/parts-queue.list.component.jsx @@ -95,15 +95,13 @@ export function PartsQueueListComponent({ bodyshop }) { }; const handleOnRowClick = (record) => { - if (record) { - if (record.id) { - history.push({ - search: queryString.stringify({ - ...searchParams, - selected: record.id, - }), - }); - } + if (record?.id) { + history.replace({ + search: queryString.stringify({ + ...searchParams, + selected: record.id, + }), + }); } }; @@ -350,6 +348,13 @@ export function PartsQueueListComponent({ bodyshop }) { selectedRowKeys: [selected], type: "radio", }} + onRow={(record, rowIndex) => { + return { + onClick: (event) => { + handleOnRowClick(record); + }, + }; + }} /> );