Skip to content

Commit

Permalink
[triggers_actions_ui] Require pageSize and DRY out types
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Aug 15, 2023
1 parent c6daf9b commit abcf499
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
EuiProgress,
EuiSpacer,
EuiDataGridSorting,
Pagination,
EuiSuperDatePicker,
OnTimeChangeProps,
EuiSwitch,
Expand All @@ -38,6 +37,7 @@ import { RefineSearchPrompt } from '../../common/components/refine_search_prompt
import { ConnectorEventLogListKPIWithApi as ConnectorEventLogListKPI } from './actions_connectors_event_log_list_kpi';
import {
EventLogDataGrid,
type EventLogDataGrid as EventLogDataGridProps,
EventLogListStatusFilter,
getIsColumnSortable,
} from '../../common/components/event_log';
Expand Down Expand Up @@ -136,7 +136,7 @@ export const ConnectorEventLogListTable = <T extends ConnectorEventLogListOption
const [sortingColumns, setSortingColumns] = useState<EuiDataGridSorting['columns']>([]);
const [filter, setFilter] = useState<string[]>([]);
const [actualTotalItemCount, setActualTotalItemCount] = useState<number>(0);
const [pagination, setPagination] = useState<Pagination>({
const [pagination, setPagination] = useState<EventLogDataGridProps['pagination']>({
pageIndex: 0,
pageSize: initialPageSize,
totalItemCount: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ExecutionLog = IExecutionLog | IConnectorsExecutionLog;
export interface EventLogDataGrid {
columns: EuiDataGridColumn[];
logs: ExecutionLog[];
pagination: Pagination;
pagination: Pagination & { pageSize: number };
sortingColumns: EuiDataGridSorting['columns'];
visibleColumns: string[];
dateFormat: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
EuiProgress,
EuiSpacer,
EuiDataGridSorting,
Pagination,
EuiSuperDatePicker,
OnTimeChangeProps,
EuiSwitch,
Expand All @@ -32,6 +31,7 @@ import {
} from '../../../constants';
import {
EventLogDataGrid,
type EventLogDataGrid as EventLogDataGridProps,
getIsColumnSortable,
ColumnHeaderWithToolTip,
numTriggeredActionsDisplay,
Expand Down Expand Up @@ -160,7 +160,7 @@ export const RuleEventLogListTable = <T extends RuleEventLogListOptions>(
const [sortingColumns, setSortingColumns] = useState<EuiDataGridSorting['columns']>([]);
const [filter, setFilter] = useState<string[]>([]);
const [actualTotalItemCount, setActualTotalItemCount] = useState<number>(0);
const [pagination, setPagination] = useState<Pagination>({
const [pagination, setPagination] = useState<EventLogDataGridProps['pagination']>({
pageIndex: 0,
pageSize: initialPageSize,
totalItemCount: 0,
Expand Down

0 comments on commit abcf499

Please sign in to comment.