mirror of
https://github.com/apache/superset.git
synced 2026-04-22 09:35:23 +00:00
feat: Implement context menu for drill by (#23454)
This commit is contained in:
committed by
GitHub
parent
542bf25729
commit
9fbfd1c1d8
@@ -111,11 +111,11 @@ export const contextMenuEventHandler =
|
||||
if (onContextMenu) {
|
||||
e.event.stop();
|
||||
const pointerEvent = e.event.event;
|
||||
const drillToDetailFilters: BinaryQueryObjectFilterClause[] = [];
|
||||
const drillFilters: BinaryQueryObjectFilterClause[] = [];
|
||||
if (groupby.length > 0) {
|
||||
const values = labelMap[e.name];
|
||||
groupby.forEach((dimension, i) =>
|
||||
drillToDetailFilters.push({
|
||||
drillFilters.push({
|
||||
col: dimension,
|
||||
op: '==',
|
||||
val: values[i],
|
||||
@@ -124,8 +124,9 @@ export const contextMenuEventHandler =
|
||||
);
|
||||
}
|
||||
onContextMenu(pointerEvent.clientX, pointerEvent.clientY, {
|
||||
drillToDetail: drillToDetailFilters,
|
||||
drillToDetail: drillFilters,
|
||||
crossFilter: getCrossFilterDataMask(e.name),
|
||||
drillBy: { filters: drillFilters, groupbyFieldName: 'groupby' },
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user