fix(ui) - audit query reset
This commit is contained in:
parent
11cefbd8af
commit
abfb97ec0d
1 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { PageTitle, Icon, Button } from 'UI';
|
||||
import AuditList from '../AuditList';
|
||||
import AuditSearchField from '../AuditSearchField';
|
||||
|
|
@ -8,11 +8,17 @@ import Select from 'Shared/Select';
|
|||
import SelectDateRange from 'Shared/SelectDateRange';
|
||||
import { numberWithCommas } from 'App/utils';
|
||||
|
||||
function AuditView(props) {
|
||||
function AuditView() {
|
||||
const { auditStore } = useStore();
|
||||
const order = useObserver(() => auditStore.order);
|
||||
const total = useObserver(() => numberWithCommas(auditStore.total));
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
auditStore.updateKey('searchQuery', '');
|
||||
}
|
||||
}, [])
|
||||
|
||||
const exportToCsv = () => {
|
||||
auditStore.exportToCsv();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue