MCPcopy Index your code
hub / github.com/cedaro/shiny-code / componentDidUpdate

Method componentDidUpdate

blocks/code/code-editor.js:50–62  ·  view source on GitHub ↗
( prevProps, prevState )

Source from the content-addressed store, hash-verified

48 }
49
50 componentDidUpdate( prevProps, prevState ) {
51 if ( this.props.language !== prevProps.language ) {
52 this.updateLanguageSettings( this.props.language );
53 }
54
55 if ( this.props.highlightLines !== prevProps.highlightLines ) {
56 this.highlightLines( this.props.highlightLines, prevProps.highlightLines );
57 }
58
59 this.editor.codemirror.setOption( 'firstLineNumber', this.props.firstLineNumber );
60 this.editor.codemirror.setOption( 'lineNumbers', this.props.showLineNumbers );
61 this.editor.codemirror.setOption( 'theme', this.props.theme );
62 }
63
64 componentWillUnmount() {
65 this.editor.codemirror.toTextArea();

Callers

nothing calls this directly

Calls 2

highlightLinesMethod · 0.95

Tested by

no test coverage detected