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

MainNavigationItem component issue #577

Open
leandroezequielbravo opened this issue Jan 26, 2023 · 1 comment
Open

MainNavigationItem component issue #577

leandroezequielbravo opened this issue Jan 26, 2023 · 1 comment

Comments

@leandroezequielbravo
Copy link

leandroezequielbravo commented Jan 26, 2023

  •  Component affected - What is the name of the component or its variation? MainNavigationItem
  • Error - What is the unexpected behaviour? TypeError e.props.onChangeSub is not a function
  • Acceptance criteria - What is the correct behaviour? Define onChangeSub function
  • Owner - Who raised the request? Leandro E. Bravo
  • Description - What's the background? How to explain the context? The exception occurs in the MainNavigationItem component of the WFP UI kit library because the onChangeSub function from the props isn't provided by default/isn't checked for an undefined value.
  • Dependencies - Is there any impact on other activities? wfp-ui
  • Severity - Is the bug a regular fix or a blocker for other activities? Hight
  • Resources - Is there any related content to attach? Sentry screen attached
    38eaa8dc-e04e-4f43-b026-b7fe111b7731(1)

Thank you

@Utzel-Butzel
Copy link
Collaborator

Hi @leandroezequielbravo, thank you for your ticket! The <MainNavigationItem /> is only working as a a direct child of <MainNavigation>. We released a fix in @wfp/[email protected] which sets a default onChangeSub prop for each MainNavigationItem now.

Btw. in the next versions the MainNavigation is built differently using the ContextAPI, so this limitation will no longer be a problem (https://www.npmjs.com/package/@un/react).

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

2 participants