Skip to content

Commit

Permalink
Merge branch 'monaco-editor' of https://github.com/nishikaza/office-u…
Browse files Browse the repository at this point in the history
…i-fabric-react into monaco-editor
  • Loading branch information
nishikaza committed Jul 30, 2019
2 parents d4fc528 + 72a4d96 commit 8acb904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class ExampleCardBase extends React.Component<IExampleCardProps, IExample
};

private _onToggleCodeClick = () => {
if (!this.Editor && !this.EditorPreview) {
if (this.canRenderLiveEditor && !this.Editor && !this.EditorPreview) {
this.Editor = React.lazy(() => import('@uifabric/tsx-editor/lib/components/Editor'));
this.EditorPreview = React.lazy(() => import('@uifabric/tsx-editor/lib/components/EditorPreview'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ExamplesSection: React.StatelessComponent<IExamplesSectionProps> =
const { view, ...exampleProps } = example;
return (
<div key={example.title + '-key'} className={styles.subSection}>
<ExampleCard {...exampleProps} onToggleEditor={handleEditorToggle} isCodeVisible={exampleProps.title === activeEditorTitle}>
<ExampleCard {...exampleProps} onToggleEditor={setActiveEditorTitle} isCodeVisible={exampleProps.title === activeEditorTitle}>
{view}
</ExampleCard>
</div>
Expand Down

0 comments on commit 8acb904

Please sign in to comment.