Skip to content

Commit 83716ea

Browse files
committed
fix Color Customization
1 parent 712c4e0 commit 83716ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/demos/Demos/VectorMap/ColorsCustomization/React

apps/demos/Demos/VectorMap/ColorsCustomization/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ const customizeLayer: ILayerProps['customize'] = (elements) => {
3030
};
3131

3232
const clickHandler = ({ target }: VectorMapTypes.ClickEvent) => {
33-
const name = target?.attribute('name') as keyof typeof countries;
33+
const name = target?.attribute('name') as CountriesKey;
3434
if (target && countries[name]) {
3535
target.selected(!target.selected());
3636
}
3737
};
3838

3939
const customizeTooltip: ITooltipProps['customizeTooltip'] = ({ attribute }) => {
40-
const name = attribute('name') as keyof typeof countries;
40+
const name = attribute('name') as CountriesKey;
4141
const country = countries[name];
4242
if (country) {
4343
return {

0 commit comments

Comments
 (0)