Skip to content

Commit

Permalink
[RAC] Fix scrolling on Obs alerts table (#109139)
Browse files Browse the repository at this point in the history
* Fix scrolling on obs alerts table and default to 50 items per page
  • Loading branch information
Kerry350 authored Aug 24, 2021
1 parent 84be1c5 commit 09fda96
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ export function AlertsTableTGrid(props: AlertsTableTGridProps) {
end: rangeTo,
filters: [],
indexNames,
itemsPerPage: 10,
itemsPerPageOptions: [10, 25, 50],
loadingText: i18n.translate('xpack.observability.alertsTable.loadingTextLabel', {
defaultMessage: 'loading alerts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const EventsContainerLoading = styled.div.attrs(({ className = '' }) => ({
const FullWidthFlexGroup = styled(EuiFlexGroup)<{ $visible: boolean }>`
overflow: hidden;
margin: 0;
min-height: 490px;
display: ${({ $visible }) => ($visible ? 'flex' : 'none')};
`;

Expand All @@ -96,7 +95,6 @@ export interface TGridStandaloneProps {
filterStatus: AlertStatus;
height?: number;
indexNames: string[];
itemsPerPage: number;
itemsPerPageOptions: number[];
query: Query;
onRuleChange?: () => void;
Expand Down Expand Up @@ -127,7 +125,6 @@ const TGridStandaloneComponent: React.FC<TGridStandaloneProps> = ({
footerText,
filterStatus,
indexNames,
itemsPerPage,
itemsPerPageOptions,
onRuleChange,
query,
Expand Down Expand Up @@ -282,7 +279,7 @@ const TGridStandaloneComponent: React.FC<TGridStandaloneProps> = ({
end,
},
indexNames,
itemsPerPage,
itemsPerPage: itemsPerPageStore,
itemsPerPageOptions,
showCheckboxes: true,
})
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/timelines/public/store/t_grid/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const tGridDefaults: SubsetTGridModel = {
indexNames: [],
isLoading: false,
isSelectAllChecked: false,
itemsPerPage: 25,
itemsPerPage: 50,
itemsPerPageOptions: [10, 25, 50, 100],
loadingEventIds: [],
selectedEventIds: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const AppRoot = React.memo(
end: '',
footerText: 'Events',
filters: [],
itemsPerPage: 50,
itemsPerPageOptions: [1, 2, 3],
loadingText: 'Loading events',
renderCellValue: () => <div data-test-subj="timeline-wrapper">test</div>,
Expand Down

0 comments on commit 09fda96

Please sign in to comment.