Skip to content

Commit 3de26c5

Browse files
montezumekodiakhq[bot]
authored andcommitted
fix(localized-rich-text-input): make behaviour match localized-multiline-text-input (#1108)
1 parent bac0d84 commit 3de26c5

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/components/inputs/localized-rich-text-input/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const Input = props => {
2020
return (
2121
<LocalizedRichTextInput
2222
value={{
23-
en: LocalizedRichTextInput.deserialize(''),
24-
de: LocalizedRichTextInput.deserialize('')
23+
en: '',
24+
de: ''
2525
}}
2626
onChange={event => console.log('event.target.value', event.target.value)}
2727
/>;

src/components/inputs/localized-rich-text-input/localized-rich-text-input.js

-4
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ LocalizedRichTextInput.propTypes = {
225225
onClickExpand: requiredIf(PropTypes.func, props => props.showExpandIcon),
226226
};
227227

228-
LocalizedRichTextInput.serialize = RichTextInput.serialize;
229-
230-
LocalizedRichTextInput.deserialize = RichTextInput.deserialize;
231-
232228
LocalizedRichTextInput.getId = getId;
233229

234230
LocalizedRichTextInput.getName = getName;

src/components/inputs/localized-rich-text-input/rich-text-input.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class RichTextInput extends React.PureComponent {
117117
// expand all multiline language inputs in case the
118118
// first one was expanded when all languages
119119
// are shown
120-
if (!this.props.isCollapsed) {
120+
if (this.props.isOpen) {
121121
this.props.expandAllTranslations();
122122
}
123123
this.props.toggleLanguages();
@@ -165,7 +165,6 @@ class RichTextInput extends React.PureComponent {
165165
'isOpen',
166166
'warning',
167167
'error',
168-
'isCollapsed',
169168
'defaultExpandMultilineText',
170169
'hasWarning',
171170
'hasWarningOnRemainingLanguages',
@@ -191,8 +190,6 @@ RichTextInput.defaultProps = {
191190

192191
RichTextInput.displayName = 'RichTextInput';
193192

194-
RichTextInput.serialize = html.serialize;
195-
RichTextInput.deserialize = html.deserialize;
196193
RichTextInput.isEmpty = isEmpty;
197194

198195
RichTextInput.propTypes = {

0 commit comments

Comments
 (0)