fix: Right click on country map with code filter (#22081)

This commit is contained in:
Michael S. Molina
2022-11-14 08:52:31 -05:00
committed by GitHub
parent ed1f50eab6
commit 824dc7188b
3 changed files with 8 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ const formatter = getNumberFormatter();
function WorldMap(element, props) {
const {
countryFieldtype,
entity,
data,
width,
@@ -111,7 +112,7 @@ function WorldMap(element, props) {
const pointerEvent = d3.event;
pointerEvent.preventDefault();
const key = source.id || source.country;
const val = mapData[key]?.name;
const val = countryFieldtype === 'name' ? mapData[key]?.name : key;
if (val) {
const filters = [
{