stevetracvc commented on a change in pull request #19381:
URL: https://github.com/apache/superset/pull/19381#discussion_r838545842
##########
File path:
superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
##########
@@ -210,6 +218,33 @@ export default function DataTable<D extends object>({
const shouldRenderFooter = columns.some(x => !!x.Footer);
+ let columnBeingDragged = -1;
+
+ const onDragStart = (e: React.DragEvent) => {
+ const el = e.target as HTMLTableCellElement;
+ columnBeingDragged = allColumns.findIndex(
+ col => col.id === el.dataset.columnName,
+ );
+ e.dataTransfer.setData('text/plain', `${columnBeingDragged}`);
Review comment:
From what I remember, it's what allows the preview of the column header
as you drag it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]