IO-2630 Adjust for oRow selection

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2024-03-13 12:04:45 -07:00
parent da5b446c30
commit a33662e6f0

View File

@@ -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);
},
};
}}
/>
</Card>
);