-
-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter Icon of Table #5293
Filter Icon of Table #5293
Conversation
<Table columns={[{ filtered: true }]} /> |
a070a4d
to
1597b99
Compare
1597b99
to
788e585
Compare
done |
Codecov Report
@@ Coverage Diff @@
## feature-2.9 #5293 +/- ##
===============================================
+ Coverage 86.11% 86.12% +0.01%
===============================================
Files 174 174
Lines 4444 4448 +4
Branches 1288 1289 +1
===============================================
+ Hits 3827 3831 +4
Misses 617 617
Continue to review full report at Codecov.
|
@@ -43,6 +43,7 @@ class App extends React.Component { | |||
filterDropdownVisible: false, | |||
data, | |||
searchText: '', | |||
isFiltered: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filtered
components/table/index.zh-CN.md
Outdated
@@ -94,6 +94,7 @@ const columns = [{ | |||
| filterDropdownVisible | 用于控制自定义筛选菜单是否可见 | boolean | - | | |||
| onFilterDropdownVisibleChange | 自定义筛选菜单可见变化时调用 | function(visible) {} | - | | |||
| filteredValue | 筛选的受控属性,外界可用此控制列的筛选状态,值为已筛选的 value 数组 | string[] | - | | |||
| filtered | 标识数据是否经过过滤 | boolean | false | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加一句『筛选图标会高亮』
components/table/filterDropdown.tsx
Outdated
@@ -209,7 +210,7 @@ export default class FilterMenu extends React.Component<FilterMenuProps, any> { | |||
</FilterDropdownMenuWrapper> | |||
); | |||
|
|||
const dropdownSelectedClass = (this.props.selectedKeys.length > 0) | |||
const dropdownSelectedClass = (this.props.selectedKeys.length > 0 || this.props.filtered) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果有 filtered
,则只看 filtered
吧。
想了下,不如把 |
rebase |
+ close ant-design#5287 + add `isFiltered` props for mark dataSource is filterd + improve CustomFilter Demo
8909b1c
to
398284d
Compare
isFiltered
props for mark dataSource is filterd