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

Custom activity editor now properly sends leftover content #2255

Merged
merged 2 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Fixed
- [client] Added circular JSON handling to `forwardToMain.ts` which fixed a bug preventing the Emulator from connecting to Direct Line Speech bots in PR [2242](https://github.com/microsoft/BotFramework-Emulator/pull/2242)
- [client/main] Fixed an issue where the Emulator was failing to detect the final redirect URL when trying to login to Azure in PR [2248](https://github.com/microsoft/BotFramework-Emulator/pull/2248)
- [client] Fixed an issue where the Custom Activity Editor was sending the default model content instead of what was currently being displayed in the editor in PR [2255](https://github.com/microsoft/BotFramework-Emulator/pull/2255)

## v4.12.0 - 2021 - 3 - 05
## Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export const CustomActivityEditor: React.FC<CustomActivityEditorProps> = (props:
// warnings are 4 and errors are 8
setIsValid(!markers.some(m => m.severity >= monaco.MarkerSeverity.Warning));
});
// the editor's model may still have leftover content from the last time it was rendered;
// send it back through the onDidChangeModelContent handler so that it gets set in the React state
editor.setValue(editor.getValue());
}, []);

const onSendActivityClick = useCallback(() => {
Expand Down