-
Notifications
You must be signed in to change notification settings - Fork 78
Callwithchat mobile: dismissed drawer after device selection #2115
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
Changes from 6 commits
c3da491
1a7a5f3
be14b66
9f49d41
1da32ce
f538d31
f9bcbbb
54e1e37
a65b341
40d3222
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Fixed bug where drawer on mobile does not get dismissed after making a selection", | ||
| "packageName": "@internal/react-composites", | ||
| "email": "carolinecao@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,8 +107,9 @@ export const MoreDrawer = (props: MoreDrawerProps): JSX.Element => { | |
| // But this is a known issue in our state. | ||
| onSelectSpeaker(selected as AudioDeviceInfo); | ||
| } | ||
| props.onLightDismiss(); | ||
| }, | ||
| [speakers, onSelectSpeaker] | ||
| [speakers, onSelectSpeaker, props] | ||
| ); | ||
|
|
||
| const drawerSelectionOptions = inferCallWithChatControlOptions(props.callControls); | ||
|
|
@@ -142,8 +143,9 @@ export const MoreDrawer = (props: MoreDrawerProps): JSX.Element => { | |
| // But this is a known issue in our state. | ||
| onSelectMicrophone(selected as AudioDeviceInfo); | ||
| } | ||
| props.onLightDismiss(); | ||
| }, | ||
| [microphones, onSelectMicrophone] | ||
| [microphones, onSelectMicrophone, props] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit: same here on avoiding props in the dep array)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^^ I second this as well
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated :) |
||
| ); | ||
|
|
||
| if (props.microphones && props.microphones.length > 0) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: avoid
propsas this means any prop change will cause this to be recreated.Instead update the above
const { speakers, onSelectSpeaker } = props;to have the onLightDismiss:
const { speakers, onSelectSpeaker, onLightDismiss } = props;and put
onLightDismissinto the dependency arrayThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ I second this as well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated :)