|
@@ -1,8 +1,8 @@
|
|
|
import {FilterField, FilterButtonGroup, FilterSelect} from '@components';
|
|
|
import {Card, Row, Space} from 'antd';
|
|
|
import {FC} from 'react';
|
|
|
-import {useExport, useField, useSearch} from './hooks';
|
|
|
-import {useDictionaryOptions, useTableSearch} from '@hooks';
|
|
|
+import {useExport, useSearch} from './hooks';
|
|
|
+import {useDictionaryOptions, useFilterField, useTableSearch} from '@hooks';
|
|
|
import {searchContext} from '../context';
|
|
|
|
|
|
const disableOptions = [
|
|
@@ -12,7 +12,12 @@ const disableOptions = [
|
|
|
];
|
|
|
|
|
|
const Filter: FC = function() {
|
|
|
- const [fields, onChange] = useField();
|
|
|
+ const [fields, onChange] = useFilterField({
|
|
|
+ name: '',
|
|
|
+ code: '',
|
|
|
+ type: '',
|
|
|
+ isNotDisable: '',
|
|
|
+ });
|
|
|
const {code, name, type, isNotDisable} = fields;
|
|
|
const onSearch = useSearch(fields);
|
|
|
const [isExporting, onExport] = useExport();
|