Skip to content

Commit

Permalink
fixup! fixup! remove react-markdown lib
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Jan 2, 2025
1 parent 4fa561e commit 99ecd91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ export class BasicViewer extends React.PureComponent<Props> {
autofocus: true,
});
editor.setSize(`100%`, `100%`);
editor.getDoc().setValue(this.props.value);
editor.save();
editor.setValue(this.props.value);
editor.focus();

this.editor = editor;
}
}

componentDidUpdate(prevProps: Readonly<Props>): void {
if (this.editor && this.props.value !== prevProps.value) {
this.editor.getDoc().setValue(this.props.value);
this.editor.save();
this.editor.setValue(this.props.value);
this.editor.focus();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
.devfileViewer > div {
overflow: auto;
height: 100%;
border: 1px solid var(--pf-global--BorderColor--100);
border: 2px solid var(--pf-global--BorderColor--100);
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export class DevfileViewer extends React.PureComponent<Props> {
gooters: true,
});
editor.setSize(`100%`, `100%`);
editor.getDoc().setValue(this.props.value);
editor.save();
editor.setValue(this.props.value);
editor.focus();

this.editor = editor;
}
Expand All @@ -57,7 +57,7 @@ export class DevfileViewer extends React.PureComponent<Props> {
componentDidUpdate(prevProps: Readonly<Props>): void {
if (this.editor && this.props.value !== prevProps.value) {
this.editor.getDoc().setValue(this.props.value);
this.editor.save();
this.editor.focus();
}
}

Expand Down

0 comments on commit 99ecd91

Please sign in to comment.