Make filtered state of columns more apparent
Summary: People complained about barely noticeable filtered state indication multiple times Reviewed By: antonk52 Differential Revision: D45394233 fbshipit-source-id: 60a3531b1808ae8f95ce8cd405a20b74bad0ed46
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9d2de05723
commit
647bc06f3a
@@ -20,6 +20,7 @@ import {
|
|||||||
Switch,
|
Switch,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import {
|
import {
|
||||||
|
FilterFilled,
|
||||||
FilterOutlined,
|
FilterOutlined,
|
||||||
MinusCircleOutlined,
|
MinusCircleOutlined,
|
||||||
PlusCircleOutlined,
|
PlusCircleOutlined,
|
||||||
@@ -198,7 +199,7 @@ export function FilterIcon({
|
|||||||
return (
|
return (
|
||||||
<Dropdown overlay={menu} trigger={['click']}>
|
<Dropdown overlay={menu} trigger={['click']}>
|
||||||
<FilterButton isActive={isActive}>
|
<FilterButton isActive={isActive}>
|
||||||
<FilterOutlined />
|
{isActive ? <FilterFilled /> : <FilterOutlined />}
|
||||||
</FilterButton>
|
</FilterButton>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
@@ -207,7 +208,7 @@ export function FilterIcon({
|
|||||||
export const FilterButton = styled.div<{isActive?: boolean}>(({isActive}) => ({
|
export const FilterButton = styled.div<{isActive?: boolean}>(({isActive}) => ({
|
||||||
backgroundColor: theme.backgroundWash,
|
backgroundColor: theme.backgroundWash,
|
||||||
visibility: isActive ? 'visible' : 'hidden',
|
visibility: isActive ? 'visible' : 'hidden',
|
||||||
color: isActive ? theme.textColorActive : theme.disabledColor,
|
color: isActive ? theme.primaryColor : theme.disabledColor,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
marginRight: 4,
|
marginRight: 4,
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
|
|||||||
@@ -194,7 +194,13 @@ function TableHeadColumn({
|
|||||||
let children = (
|
let children = (
|
||||||
<Layout.Right center>
|
<Layout.Right center>
|
||||||
<div {...divProps}>
|
<div {...divProps}>
|
||||||
<Text type="secondary">
|
<Text
|
||||||
|
type="secondary"
|
||||||
|
style={
|
||||||
|
column.filters?.filter(({enabled}) => enabled).length
|
||||||
|
? {color: theme.primaryColor, fontWeight: 'bold'}
|
||||||
|
: {}
|
||||||
|
}>
|
||||||
{column.title === undefined ? (
|
{column.title === undefined ? (
|
||||||
toFirstUpper(column.key)
|
toFirstUpper(column.key)
|
||||||
) : column.title === '' ? (
|
) : column.title === '' ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user