Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChoroplethCanvas: Failed prop type / required properties (v0.87.0) #2634

Open
Utomik-Mark opened this issue Aug 14, 2024 · 0 comments
Open

Comments

@Utomik-Mark
Copy link

Failed prop type / required properties
When adding the ChoroplethCanvas, a lot of properties which are not required still need to be set to prevent warnings in the console log of the browser. After setting these properties, there are a few which keep being a problem;

  • layers
  • match
  • value

Layers can be set, but when doing so results in a typescript warning, the other two I cannot find how to set.

To Reproduce
The already existing codebox showcases the issue (I cannot find for which issue this one is made).
I also created one in which all 'optional' properties are set anyway:
codesandbox. Leaving the three properties I don't see how to fix.

Steps to reproduce the behavior:

  1. Go to the codebox
  2. Press ctrl-shift-i to show the console log (in chrome)
  3. See warnings & errors

Expected behavior
No warnings on optional properties.

Console log

console.js:288 Warning: Failed prop type: The prop layers is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

console.js:288 Warning: Failed prop type: The prop match is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

Warning: Failed prop type: The prop value is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

FYI nice work with nico.rocks!

@Utomik-Mark Utomik-Mark changed the title ChoroplethCanvas: Failed prop type / required properties ChoroplethCanvas: Failed prop type / required properties (v0.87.0) Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant