[RAC] Fix scrolling on Obs alerts table (#109139)

* Fix scrolling on obs alerts table and default to 50 items per page
This commit is contained in:
Kerry Gallagher 2021-08-24 18:21:23 +01:00 committed by GitHub
parent 84be1c500e
commit 09fda96254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 7 deletions

View file

@ -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',

View file

@ -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')};
`;
@ -96,7 +95,6 @@ export interface TGridStandaloneProps {
filterStatus: AlertStatus;
height?: number;
indexNames: string[];
itemsPerPage: number;
itemsPerPageOptions: number[];
query: Query;
onRuleChange?: () => void;
@ -127,7 +125,6 @@ const TGridStandaloneComponent: React.FC<TGridStandaloneProps> = ({
footerText,
filterStatus,
indexNames,
itemsPerPage,
itemsPerPageOptions,
onRuleChange,
query,
@ -282,7 +279,7 @@ const TGridStandaloneComponent: React.FC<TGridStandaloneProps> = ({
end,
},
indexNames,
itemsPerPage,
itemsPerPage: itemsPerPageStore,
itemsPerPageOptions,
showCheckboxes: true,
})

View file

@ -74,7 +74,7 @@ export const tGridDefaults: SubsetTGridModel = {
indexNames: [],
isLoading: false,
isSelectAllChecked: false,
itemsPerPage: 25,
itemsPerPage: 50,
itemsPerPageOptions: [10, 25, 50, 100],
loadingEventIds: [],
selectedEventIds: {},

View file

@ -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>,