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

Uncaught TypeError: Cannot read property 'viewBox' of undefined #7590

Closed
janamano opened this issue Jan 19, 2021 · 4 comments
Closed

Uncaught TypeError: Cannot read property 'viewBox' of undefined #7590

janamano opened this issue Jan 19, 2021 · 4 comments

Comments

@janamano
Copy link

Followed the documentation to create a StructuredList with selection. But I ran into this type error:
here is my code

                                  `<StructuredListInput id={i.toString()} value={row.value!} defaultChecked />
                                  <StructuredListCell>
                                  
                                  <Icon 
                                      className="bx--structured-list-svg"
                                      description="description"
                                      fill="currentColor"
                                      aria-label="label"
                                      height="16"
                                      width="16"
                                      viewBox="0 0 16 16"
                                      />
                                  </StructuredListCell>`

Is it possible to provide an example of how to create a selection list, the one in the storybook is not clear enough

@joshblack
Copy link
Contributor

Hi there, @janamano! 👋

Could you share a link to a CodeSandbox that re-creates the problem? Also would love to know what documentation you're referring to so I can make sure it's correct or updated with whatever challenge you're running into 👀

@janamano
Copy link
Author

hi @joshblack
here is the link to the codesandbox: https://codesandbox.io/s/zealous-noyce-mqbze
Im just wondering what the Unknown Component is, I am unable to import this Component. The documentation I am referring to is the docs for the the StructuredList component with selection: https://deploy-preview-2127--carbon-components-react.netlify.app/?selectedKind=StructuredList&selectedStory=Selection&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fstories%2Fstories-panel

I was wondering if you can show me a more complete example, in the documentation it's a little bit unclear which props I should pass into the Icon component

@joshblack
Copy link
Contributor

@janamano hmm, that documentation seems like it might be outdated/from an older deployment. This link should reflect the latest status of the component and offer better documentation/examples: https://react.carbondesignsystem.com/?path=/story/structuredlist--selection let me know if this helps! In particular for the icon 😄

@janamano
Copy link
Author

thanks for the new link, appreciate the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants