Merge pull request #1241 from 2betop/1224

Table列的 filter 功能如果没有选中的值,不要显示 重置按钮
This commit is contained in:
RickCole 2020-12-24 11:44:25 +08:00 committed by GitHub
commit 130bb09dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -345,7 +345,7 @@ export default class VirtualList extends React.PureComponent<Props, State> {
if (typeof start !== 'undefined' && typeof stop !== 'undefined') {
for (let index = start; index <= stop; index++) {
if (stickyIndices != null && stickyIndices.includes(index)) {
if (stickyIndices != null && ~stickyIndices.indexOf(index)) {
continue;
}

View File

@ -246,12 +246,14 @@ export class HeadCellFilterDropDown extends React.Component<
</Checkbox>
</li>
))}
<li
key="DropDown-menu-reset"
onClick={this.handleReset.bind(this)}
>
{__('重置')}
</li>
{filterOptions.some((item: any) => item.selected) ? (
<li
key="DropDown-menu-reset"
onClick={this.handleReset.bind(this)}
>
{__('重置')}
</li>
) : null}
</ul>
) : null}
</PopOver>