Skip to content

Commit

Permalink
remove cloneDeep in Grid
Browse files Browse the repository at this point in the history
  • Loading branch information
intellild committed Jun 5, 2018
1 parent c8a67aa commit ba15c9a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/zent/src/grid/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import some from 'lodash/some';
import map from 'lodash/map';
import isFunction from 'lodash/isFunction';
import filter from 'lodash/filter';
import cloneDeep from 'lodash/cloneDeep';
import includes from 'lodash/includes';
import measureScrollbar from 'utils/dom/measureScrollbar';
import WindowResizeHandler from 'utils/component/WindowResizeHandler';
Expand Down Expand Up @@ -266,7 +265,7 @@ class Grid extends PureComponent {

getColumns = (props, columns, expandRowKeys) => {
let { selection, datasets, expandation } = props || this.props;
columns = cloneDeep(columns || this.store.getState('columns'));
columns = (columns || this.store.getState('columns')).slice();
expandRowKeys = expandRowKeys || this.state.expandRowKeys;
const hasLeft = columns.some(
column => column.fixed === 'left' || column.fixed === true
Expand Down Expand Up @@ -601,7 +600,7 @@ class Grid extends PureComponent {
};

handleBatchSelect = (type, data) => {
let selectedRowKeys = cloneDeep(this.store.getState('selectedRowKeys'));
let selectedRowKeys = this.store.getState('selectedRowKeys').slice();

let changeRowKeys = [];

Expand Down

0 comments on commit ba15c9a

Please sign in to comment.