Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#2370 simple fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 4223369)
  • Loading branch information
siemiatj authored and metas-ts committed Sep 20, 2019
1 parent 2764cad commit 2400af2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/table/TableItem.js
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import { merge } from 'lodash';
import { merge, isEqual } from 'lodash';

import {
VIEW_EDITOR_RENDER_MODES_ALWAYS,
Expand Down Expand Up @@ -55,11 +55,16 @@ class TableItem extends PureComponent {
}

componentDidUpdate(prevProps) {
const { fieldsByName } = this.props;
const { multilineText } = this.state;

if (multilineText && this.props.isSelected !== prevProps.isSelected) {
this.handleCellExtend();
}

if (!isEqual(prevProps.fieldsByName, fieldsByName)) {
this.setState({ editedCells: {} });
}
}

initPropertyEditor = fieldName => {
Expand Down

0 comments on commit 2400af2

Please sign in to comment.