Fix import list exclusion props

This commit is contained in:
CheAle14 2024-03-03 15:37:20 +00:00 committed by Mark McDowall
parent e81bb3b993
commit d0e9504af0
2 changed files with 6 additions and 7 deletions

View File

@ -19,6 +19,7 @@ export interface AppSectionSaveState {
export interface PagedAppSectionState {
pageSize: number;
totalRecords?: number;
}
export interface AppSectionFilterState<T> {

View File

@ -1,5 +1,6 @@
import React, { useCallback, useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router';
import { createSelector } from 'reselect';
import AppState from 'App/State/AppState';
import FieldSet from 'Components/FieldSet';
@ -41,11 +42,6 @@ const COLUMNS = [
},
];
interface ImportListExclusionsProps {
useCurrentPage: number;
totalRecords: number;
}
function createImportListExlucionsSelector() {
return createSelector(
(state: AppState) => state.settings.importListExclusions,
@ -57,8 +53,9 @@ function createImportListExlucionsSelector() {
);
}
function ImportListExclusions(props: ImportListExclusionsProps) {
const { useCurrentPage, totalRecords } = props;
function ImportListExclusions() {
const history = useHistory();
const useCurrentPage = history.action === 'POP';
const dispatch = useDispatch();
@ -155,6 +152,7 @@ function ImportListExclusions(props: ImportListExclusionsProps) {
sortKey,
error,
sortDirection,
totalRecords,
...otherProps
} = selected;