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

TypeError: Cannot read property method of undefined + onSelectionChanged + office-ui-fabric-react/lib/Dropdown #16647

Closed
sparx2020 opened this issue Jan 26, 2021 · 6 comments
Assignees
Labels
Issue Pinged Needs: Investigation The Shield Dev should investigate this issue and propose a fix Resolution: Soft Close Soft closing inactive issues over a certain period

Comments

@sparx2020
Copy link

Unable to call method in onSelectionChanged Method of Fluent UI Dropdown (TypeError: Cannot read property method of undefined + onSelectionChanged + office-ui-fabric-react/lib/Dropdown).

Screenshot
https://1drv.ms/u/s!Avq9uGI4OfVxat1y30B9jsCbC4g?e=BORWvq

Method getMytodolistId is called inside onSelectionChanged
this.getMytodolistId(PageContext,strUserEmail,generalTaskId).then((itemId:number) => {
console.log(itemId);

});

@msft-fluent-ui-bot
Copy link
Collaborator

Thanks for taking the time to enter an issue. However, it seems that there aren't enough details here for this issue to be actionable.

When issues are created, we need details such as:

  1. Which Fluent UI component is causing the issue
  2. Which package name and version the component is from
  3. Specific, complete steps to reproduce the issue
  4. What behaviors and attributes are missing or incorrect
  5. What you expected and what is actually happening
  6. Confirmation that the problem reproduces in isolation

Without a clear understanding of these details, it's not possible to take clear action on issues. We are unable to meet your expectations, properly address the root cause, and make changes without affecting the expectations of other consumers.

Please provide these additional details as you are able. The default issue template provides an outline of these details and is viewable when creating a new issue. Additionally, if this is an accessibility issue, please see Accessibility Troubleshooting in our wiki for more guidance. If these details cannot be provided, please kindly close the issue.

Thank you for your patience.

@sparx2020
Copy link
Author

Please find below the details. If more informations required, please let me know.

  1. Which Fluent UI component is causing the issue - Office Fabric Dropdown Control

https://developer.microsoft.com/en-us/fluentui#/controls/web/dropdown

Facing issue in Onchange of the dropdown

  1. Which package name and version the component is from
    "@fluentui/react": "^7.154.0",
    "office-ui-fabric-react": "6.214.0",
    "react": "16.8.5",

  2. Specific, complete steps to reproduce the issue

SharePoint Online has list of dropdown. Onchange of that dropdown value triggers an api call (method) and getting the error message - cannot read the property. Tried the options like autobind. Still no luck.

https://1drv.ms/u/s!Avq9uGI4OfVxbDCfcNqwkV1F1VI?e=1qo0Gn
https://1drv.ms/u/s!Avq9uGI4OfVxbXDRBi5gUsoumaU?e=SEH51d
https://1drv.ms/u/s!Avq9uGI4OfVxbpL0mDkYhoXi86g?e=En8y5F
cannot read any method
https://1drv.ms/u/s!Avq9uGI4OfVxb53pd1ettMRSaK0?e=cyRTdA

  1. What behaviors and attributes are missing or incorrect

Please refere the above links. None of the method are working inside onselectionchanged of dropdown. Throws an error cannot read the property

  1. What you expected and what is actually happening

Expects method execution under onselectionchanged of dropdown

  1. Confirmation that the problem reproduces in isolation
    Yes.

@sparx2020
Copy link
Author

Any update please

@msft-fluent-ui-bot
Copy link
Collaborator

@layershifter

Gentle ping that this issue needs attention.

@layershifter layershifter removed their assignment Mar 29, 2021
@gouttierre gouttierre added Needs: Investigation The Shield Dev should investigate this issue and propose a fix and removed Needs: Attention Needs: Triage 🔍 labels Apr 6, 2021
@gouttierre
Copy link
Contributor

@sparx2020 - thank you for the feedback. We will schedule this for further investigations.

@tomi-msft - Would you be able to confirm if this is a regression, or if this behavior is an issue?

@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Oct 21, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Issue Pinged Needs: Investigation The Shield Dev should investigate this issue and propose a fix Resolution: Soft Close Soft closing inactive issues over a certain period
Projects
None yet
Development

No branches or pull requests

5 participants