Browse Source

fix: table filter dropdown in rtl (#23695)

pull/23700/head
xrkffgg 5 years ago
committed by GitHub
parent
commit
156ff7652c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      components/table/hooks/useFilter/FilterDropdown.tsx

5
components/table/hooks/useFilter/FilterDropdown.tsx

@ -11,6 +11,7 @@ import { ColumnType, ColumnFilterItem, Key, TableLocale, GetPopupContainer } fro
import FilterDropdownMenuWrapper from './FilterWrapper';
import { FilterState } from '.';
import useSyncState from '../useSyncState';
import { ConfigContext } from '../../../config-provider/context';
const { SubMenu, Item: MenuItem } = Menu;
@ -230,6 +231,8 @@ function FilterDropdown<RecordType>(props: FilterDropdownProps<RecordType>) {
filterIcon = <FilterFilled />;
}
const { direction } = React.useContext(ConfigContext);
return (
<div className={classNames(`${prefixCls}-column`)}>
<span className={`${prefixCls}-column-title`}>{children}</span>
@ -248,7 +251,7 @@ function FilterDropdown<RecordType>(props: FilterDropdownProps<RecordType>) {
visible={mergedVisible}
onVisibleChange={onVisibleChange}
getPopupContainer={getPopupContainer}
placement="bottomRight"
placement={direction === 'rtl' ? 'bottomLeft' : 'bottomRight'}
>
<span
role="button"

Loading…
Cancel
Save