yong1le commented on code in PR #35919:
URL: https://github.com/apache/superset/pull/35919#discussion_r2501150824
##########
superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.js:
##########
@@ -115,8 +120,17 @@ function WorldMap(element, props) {
const getCrossFilterDataMask = source => {
const selected = Object.values(filterState.selectedValues || {});
const key = source.id || source.country;
- const country =
- countryFieldtype === 'name' ? mapData[key]?.name : mapData[key]?.country;
+
+ let country;
+ if (countryFieldtype === 'name') {
+ country = mapData[key]?.name;
+ } else if (countryFieldtype === 'cca2') {
+ country = mapData[key]?.codes?.cca2;
+ } else if (countryFieldtype === 'cioc') {
+ country = mapData[key]?.codes?.cioc;
+ } else {
+ country = mapData[key]?.country;
+ }
Review Comment:
I've realized I didn't need to send all the code formats and could just do
one, so this should decrease the complexity of the PR.
--
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]