Skip to content

Commit

Permalink
Merge pull request #78 from Glen1021/master
Browse files Browse the repository at this point in the history
fix: 兼容table为null的情况
  • Loading branch information
jinzhan authored Dec 13, 2021
2 parents 90c701f + b6ec9b6 commit 3847ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/src/containers/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class Header extends Component {
}
handleSearch(value) {
const opts = this.data.get('opts');
let showOpts = value ? opts.filter(item => item.name.indexOf(value) > -1) : opts;
let showOpts = value ? opts.filter(item => item.name && item.name.toLowerCase().indexOf(value.toLowerCase()) > -1) : opts;
this.data.set('showOpts', showOpts);
}
handleSelect(value) {
Expand Down
2 changes: 1 addition & 1 deletion src/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default san.defineComponent({
},
inited() {
this.rowSpanArr = {};
let data = this.data.get('data').concat() || [];
let data = this.data.get('data') ? this.data.get('data').concat() : [];

this.data.set('expandedRowKeys', this.data.get('expandedRowKeys') || this.data.get('defaultExpandedRowKeys'));
this.data.set('originalData', data);
Expand Down

0 comments on commit 3847ca4

Please sign in to comment.