-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add Typescript Typing for "selectionChanged" event #1225
Comments
Hello qingwang96, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
Yeah seems like there is some limitation with a purely js react custom events. Here is a quick sample, of what we expect ts: And here is the basic structure for all of our CustomEvents. I think you'll mainly be concerned with the "detail" : microsoft-graph-toolkit/packages/mgt-element/src/components/baseComponent.ts Lines 184 to 196 in d9ced84
Hope this helps in the meantime |
At the meantime, we should investigate to implement this on mgt. |
It looks like web component analyzer will support what we need to make this fly in the future based on: I've raised runem/web-component-analyzer#248 to see if this is going to be addressed soon. |
This was delivered in v3.0 |
For the "selectionChanged" event on PeoplePicker component and others such as TeamsChannelPicker, the Typescript typing for the event property is not specified past the global React "Event" type.
Could somebody help to clarify the expected event structure in Typescript?
From "react.ts" in generated node_modules:
The text was updated successfully, but these errors were encountered: