From dca2fef8f8d4e068d9a5ab9ef6cd5636190d2ceb Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 25 Aug 2023 12:35:46 -0400
Subject: from last

---
 src/client/views/nodes/DataVizBox/components/TableBox.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')

diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index 01f33dd80..067dff07a 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -154,13 +154,14 @@ export class TableBox extends React.Component<TableBoxProps> {
                                         className="table-row"
                                         onClick={action(e => {
                                             const highlited = Cast(this.props.layoutDoc.dataViz_highlitedRows, listSpec('number'), null);
+                                            const selected = Cast(this.props.layoutDoc.dataViz_selectedRows, listSpec('number'), null);
                                             if (e.metaKey) {
                                                 // highlighting a row
                                                 if (highlited?.includes(rowId)) highlited.splice(highlited.indexOf(rowId), 1);
                                                 else highlited?.push(rowId);
+                                                if (!selected?.includes(rowId)) selected?.push(rowId);
                                             } else {
                                                 // selecting a row
-                                                const selected = Cast(this.props.layoutDoc.dataViz_selectedRows, listSpec('number'), null);
                                                 if (selected?.includes(rowId)) {
                                                     if (highlited?.includes(rowId)) highlited.splice(highlited.indexOf(rowId), 1);
                                                     selected.splice(selected.indexOf(rowId), 1);
-- 
cgit v1.2.3-70-g09d2

