Skip to content

Commit 98fa0ee

Browse files
authored
Merge pull request #222 from plotly/axes-title-input
Add placeholder value to titles
2 parents 164c505 + a8d93a3 commit 98fa0ee

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/fields/MultiFormatTextEditor.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ import {connectToContainer} from 'lib';
66

77
export class UnconnectedMultiFormatTextEditor extends Component {
88
render() {
9+
const {multiValued, container, attr} = this.props;
910
let fullValue = this.props.fullValue;
11+
1012
let placeholder;
11-
if (this.props.multiValued) {
13+
if (multiValued || (!container[attr] && fullValue)) {
1214
placeholder = fullValue;
1315
fullValue = '';
1416
}
17+
1518
return (
1619
<Field {...this.props}>
1720
<MultiFormatTextEditor

src/components/widgets/text_editors/MultiFormatTextEditor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ class MultiFormatTextEditor extends Component {
209209
return null;
210210
}
211211

212-
const {onChange, placeholder, value, localize: _} = this.props;
212+
const {onChange, localize: _, placeholder, value} = this.props;
213+
213214
const {currentTab} = this.state;
214215

215216
const richTextClassNames = classnames(

0 commit comments

Comments
 (0)