Skip to content

Commit

Permalink
fix: column filter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed Feb 28, 2018
1 parent 51217fe commit 90a77b1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
16 changes: 15 additions & 1 deletion demo/GridEditDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ const { createCellField } = Table;

const mockData = {
data: [
{
email: 'xw@abc.com',
nameId: 'xiaowang',
name: '小王',
cityId: 'bj',
city: '北京',
},
{
email: 'xl@abc.com',
nameId: 'xiaoli',
name: '小李',
cityId: 'hz',
city: '杭州',
},
],
currentPage: 1,
totalCount: 10,
Expand Down Expand Up @@ -182,7 +196,7 @@ class Demo extends React.Component {
width: 300,
type: 'action',
actionType: 'link',
collapseNum: 1,
collapseNum: 3,
actions: [
{
title: '编辑',
Expand Down
4 changes: 2 additions & 2 deletions demo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import ReactDOM from 'react-dom';

import React from 'react';
// import Demo from './GridDemo';
// import Demo2 from './GridEditDemo';
import Demo2 from './GridEditDemo';
// import Demo3 from './TreeGridDemo';
// import Demo4 from './GridViewModeDemo';
// import Demo5 from './TableGroup';
import Demo6 from './TableRowGroup';

// ReactDOM.render(<Demo />, document.getElementById('UXCoreDemo'));
// ReactDOM.render(<Demo2 />, document.getElementById('UXCoreDemo2'));
ReactDOM.render(<Demo2 />, document.getElementById('UXCoreDemo2'));
// ReactDOM.render(<Demo3 />, document.getElementById('UXCoreDemo3'));
// ReactDOM.render(<Demo4 />, document.getElementById('UXCoreDemo4'));
// ReactDOM.render(<Demo5 />, document.getElementById('UXCoreDemo5'));
Expand Down
3 changes: 2 additions & 1 deletion src/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,8 @@ class Table extends React.Component {
// filter the column whose dataKey is rowGroupKey

columns = columns.filter(item =>
item.dataKey !== 'jsxchecked' && item.dataKey !== 'jsxtreeIcon' && item.dataKey !== actualProps.rowGroupKey,
item.dataKey === undefined ||
(item.dataKey !== 'jsxchecked' && item.dataKey !== 'jsxtreeIcon' && item.dataKey !== actualProps.rowGroupKey),
);

if (!!actualProps.rowSelection && !hasCheckboxColumn) {
Expand Down
2 changes: 1 addition & 1 deletion src/style/ActionBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
max-width: 232px;
max-height: 400px;
overflow: auto;
padding: '16px 12px';
padding: 16px 12px;
}
.kuma-tree {
padding: 0;
Expand Down

0 comments on commit 90a77b1

Please sign in to comment.