Skip to content

1.7.3 Table Column template style API lack onFilter onFilterDropdownVisibleChange 1.7.3 Template style API Table Column lacks attributes #3847

@viruscamp

Description

@viruscamp
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

vue-ant-design 1.7.3 Table.Column 缺少两个属性 lacks two props
onFilter
onFilterDropdownVisibleChange
Complete the template API of Table/Column
补完 template 风格 API 的 Table 的 Column 的功能

<a-table :dataSource="bills">
  <a-table-column key="name" title="Name" data-index="name" />
  <a-table-column key="type" title="Type" data-index="type"
    :filters="[{ text: 'New', value: 'New' }, { text: 'Checked', value: 'Checked' },]"
    :defaultFilteredValue="['Checked']"
    :onFilter="(value, record) => record.type == value">
<a-table>

What does the proposed API look like?

直接修改 node_modules 内文件,功能可用, 对用了和没用 onFilter 的 Table 都没有报错
修改 components/table/interface.js

export var ColumnProps = {
  title: PropTypes.any,
  ...
  onFilter: PropTypes.func,
  onFilterDropdownVisibleChange: PropTypes.func,
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions