Browse Source

🐛 fix Table column.filtered not working (#22597)

close #22590
pull/22792/head
偏右 5 years ago
committed by GitHub
parent
commit
1c302163af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/table/filterDropdown.tsx
  2. 1
      components/table/interface.tsx
  3. 2
      components/table/style/index.less

2
components/table/filterDropdown.tsx

@ -206,7 +206,7 @@ class FilterMenu<T> extends React.Component<FilterMenuProps<T>, FilterMenuState<
}
const dropdownIconClass = classNames({
[`${prefixCls}-selected`]: filtered,
[`${prefixCls}-selected`]: 'filtered' in column ? column.filtered : filtered,
[`${prefixCls}-open`]: this.getDropdownVisible(),
});

1
components/table/interface.tsx

@ -56,6 +56,7 @@ export interface ColumnProps<T> {
fixed?: boolean | typeof ColumnFixedPlacements[number];
filterIcon?: React.ReactNode | ((filtered: boolean) => React.ReactNode);
filteredValue?: any[] | null;
filtered?: boolean;
defaultFilteredValue?: any[];
sortOrder?: SortOrder | boolean;
children?: ColumnProps<T>[];

2
components/table/style/index.less

@ -75,7 +75,7 @@
}
}
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix} {
color: @primary-color;
}

Loading…
Cancel
Save