fix: ignore the sort_by when no data
This commit is contained in:
@@ -14,10 +14,7 @@ import { ListItem } from '../config/types';
|
||||
|
||||
interface ColumnsHookProps {
|
||||
handleSelect: (val: string, record: ListItem) => void;
|
||||
sortOrder: {
|
||||
order?: 'ascend' | 'descend' | null;
|
||||
columnKey?: string;
|
||||
};
|
||||
sortOrder: string[];
|
||||
}
|
||||
|
||||
const actionList: Global.ActionItem[] = [
|
||||
|
||||
@@ -8,6 +8,7 @@ import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { useIntl, useModel } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { ConfigProvider, message, Table } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import { useMemo, useState } from 'react';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
@@ -148,7 +149,7 @@ const Users: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-users" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.users.nofound'
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user