Skip to content

Commit ade3679

Browse files
nicolaskruchtenVeraZab
authored andcommitted
fix text editor placeholder
1 parent f943ae8 commit ade3679

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/fields/TextEditor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Field from './Field';
22
import React, {Component} from 'react';
33
import PropTypes from 'prop-types';
44
import {connectToContainer} from 'lib';
5+
import nestedProperty from 'plotly.js/src/lib/nested_property';
56
import LaTeX from '../widgets/text_editors/LaTeX';
67
import RichText from '../widgets/text_editors/RichText';
78
import MultiFormat from '../widgets/text_editors/MultiFormat';
@@ -24,7 +25,7 @@ class UnconnectedTextEditor extends Component {
2425
let fullValue = this.props.fullValue;
2526

2627
let placeholder;
27-
if (multiValued || (fullValue && (!container || !container[attr]))) {
28+
if (multiValued || (fullValue && (!container || !nestedProperty(container, attr)))) {
2829
placeholder = fullValue;
2930
fullValue = '';
3031
}

0 commit comments

Comments
 (0)