We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712c4e0 commit 83716eaCopy full SHA for 83716ea
1 file changed
apps/demos/Demos/VectorMap/ColorsCustomization/React/App.tsx
@@ -30,14 +30,14 @@ const customizeLayer: ILayerProps['customize'] = (elements) => {
30
};
31
32
const clickHandler = ({ target }: VectorMapTypes.ClickEvent) => {
33
- const name = target?.attribute('name') as keyof typeof countries;
+ const name = target?.attribute('name') as CountriesKey;
34
if (target && countries[name]) {
35
target.selected(!target.selected());
36
}
37
38
39
const customizeTooltip: ITooltipProps['customizeTooltip'] = ({ attribute }) => {
40
- const name = attribute('name') as keyof typeof countries;
+ const name = attribute('name') as CountriesKey;
41
const country = countries[name];
42
if (country) {
43
return {
0 commit comments