@@ -67,7 +67,8 @@ export class UnconnectedTextEditor extends Component {
67
67
68
68
let fullValue = this . getAdjustedFullValue ( this . props . fullValue ) ;
69
69
70
- let placeholder ;
70
+ let placeholder = this . props . placeholder ;
71
+
71
72
if ( multiValued || ( fullValue && ( ! container || ! nestedProperty ( container , attr ) ) ) ) {
72
73
placeholder = fullValue ;
73
74
fullValue = '' ;
@@ -118,16 +119,27 @@ UnconnectedTextEditor.propTypes = {
118
119
latexOnly : PropTypes . bool ,
119
120
richTextOnly : PropTypes . bool ,
120
121
updatePlot : PropTypes . func ,
122
+ placeholder : PropTypes . string ,
121
123
} ;
122
124
123
125
UnconnectedTextEditor . contextTypes = {
124
126
localize : PropTypes . func ,
127
+ fullLayout : PropTypes . object ,
125
128
} ;
126
129
127
130
export default connectToContainer ( UnconnectedTextEditor , {
128
131
modifyPlotProps : ( props , context , plotProps ) => {
129
132
if ( plotProps . isVisible && plotProps . multiValued ) {
130
133
plotProps . isVisible = false ;
131
134
}
135
+
136
+ if (
137
+ context . fullLayout &&
138
+ context . fullLayout . _dfltTitle &&
139
+ Object . values ( context . fullLayout . _dfltTitle ) . includes ( plotProps . fullValue )
140
+ ) {
141
+ plotProps . placeholder = plotProps . fullValue ;
142
+ plotProps . fullValue = '' ;
143
+ }
132
144
} ,
133
145
} ) ;
0 commit comments