File tree Expand file tree Collapse file tree
packages/categorize/configure/src/design/categories Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import ReactDOM from 'react-dom' ;
23import PropTypes from 'prop-types' ;
34import { withStyles } from '@material-ui/core/styles' ;
45import { choiceUtils as utils } from '@pie-lib/pie-toolbox/config-ui' ;
@@ -16,6 +17,7 @@ import Category from './category';
1617import Header from '../header' ;
1718import { generateValidationMessage , getMaxCategoryChoices } from '../../utils' ;
1819import { RowLabel } from './RowLabel' ;
20+ import { renderMath } from '@pie-lib/pie-toolbox/math-rendering' ;
1921
2022const styles = ( theme ) => ( {
2123 categories : {
@@ -79,6 +81,20 @@ export class Categories extends React.Component {
7981 focusedEl : null ,
8082 } ;
8183
84+ componentDidMount ( ) {
85+ // eslint-disable-next-line
86+ const domNode = ReactDOM . findDOMNode ( this ) ;
87+
88+ renderMath ( domNode ) ;
89+ }
90+
91+ componentDidUpdate ( ) {
92+ // eslint-disable-next-line
93+ const domNode = ReactDOM . findDOMNode ( this ) ;
94+
95+ renderMath ( domNode ) ;
96+ }
97+
8298 add = ( ) => {
8399 const { model, categories : oldCategories } = this . props ;
84100 const { categoriesPerRow, correctResponse, allowAlternateEnabled } = model ;
You can’t perform that action at this time.
0 commit comments