fix(admin): hopefully fix an exception that is being thrown in develop. Closes #3373
This commit is contained in:
@@ -37,7 +37,11 @@ export const ClientTable: FC<ClientTableProps> = ({ data }) => {
|
|||||||
sorter: (a: any, b: any) => b.user.displayName.localeCompare(a.user.displayName),
|
sorter: (a: any, b: any) => b.user.displayName.localeCompare(a.user.displayName),
|
||||||
filterIcon: <SearchOutlined />,
|
filterIcon: <SearchOutlined />,
|
||||||
// eslint-disable-next-line react/no-unstable-nested-components
|
// eslint-disable-next-line react/no-unstable-nested-components
|
||||||
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm }: FilterDropdownProps) => (
|
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm }: FilterDropdownProps) => {
|
||||||
|
if (selectedKeys.length === 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (
|
||||||
<div style={{ padding: 8 }}>
|
<div style={{ padding: 8 }}>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Search display names..."
|
placeholder="Search display names..."
|
||||||
@@ -48,7 +52,8 @@ export const ClientTable: FC<ClientTableProps> = ({ data }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
),
|
);
|
||||||
|
},
|
||||||
onFilter: (value: string, record: Client) => record.user.displayName.includes(value),
|
onFilter: (value: string, record: Client) => record.user.displayName.includes(value),
|
||||||
sortDirections: ['descend', 'ascend'] as SortOrder[],
|
sortDirections: ['descend', 'ascend'] as SortOrder[],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user