fix: World Map right-click value (#21209)

This commit is contained in:
Michael S. Molina 2022-08-26 15:08:24 -03:00 committed by GitHub
parent 0726840fb7
commit d41f44fcdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -108,14 +108,13 @@ function WorldMap(element, props) {
const handleContextMenu = source => {
const pointerEvent = d3.event;
pointerEvent.preventDefault();
const val = source.id || source.country;
const formattedVal = mapData[val].name;
const val = mapData[source.id || source.country].name;
const filters = [
{
col: entity,
op: '==',
val,
formattedVal,
formattedVal: val,
},
];
onContextMenu(filters, pointerEvent.clientX, pointerEvent.clientY);