rm defunct ToolbarSection from ListViewToolbar
@@ -14,7 +14,6 @@ import {
Toolbar,
ToolbarGroup,
ToolbarItem,
- ToolbarSection,
} from '@patternfly/react-core';
import { SortAlphaDownIcon, SortAlphaUpIcon } from '@patternfly/react-icons';
import * as React from 'react';
@@ -75,7 +74,8 @@ export interface IListViewToolbarProps {
onUpdateCurrentSortType(sortType: ISortType): void;
}
-export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> = ({
+export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> =
+ ({
activeFilters,
children,
currentFilterType,
@@ -148,7 +148,7 @@ export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> = (
value={currentValue}
placeholder={currentFilterType.placeholder}
onChange={(val, event) => onUpdateCurrentValue(event as any)}
- onKeyPress={event => onValueKeyPress(event as any)}
+ onKeyPress={(event) => onValueKeyPress(event as any)}
/>
);
}
@@ -224,18 +224,23 @@ export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> = (
</ToolbarItem>
</ToolbarGroup>
<ToolbarGroup>
- <ToolbarItem className={'pf-u-mx-md list-view-toolbar__child-items'}>{children}</ToolbarItem>
+ <ToolbarItem className={'pf-u-mx-md list-view-toolbar__child-items'}>
+ {children}
+ </ToolbarItem>
</ToolbarGroup>
- <ToolbarSection aria-label={'Results Section'}>
- <ToolbarGroup>
+ <ToolbarGroup aria-label={'Results Section'}>
<ToolbarItem>
{activeFilters && activeFilters.length > 0 && (
<>
- <Title size={'lg'}>{i18nResultsCount}</Title>
+ <Title size={'lg'} headingLevel={'h4'}>
+ {i18nResultsCount}
+ </Title>
<Stack>
<StackItem>
- <Title size={'md'}>Active Filters:</Title>
+ <Title size={'md'} headingLevel={'h5'}>
+ Active Filters:
+ </Title>
</StackItem>
<StackItem>
<ChipGroup>
@@ -250,7 +255,7 @@ export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> = (
<Button
variant={ButtonVariant.link}
data-testid={'list-view-toolbar-clear-filters'}
- onClick={event => onClearFilters(event as any)}
+ onClick={(event) => onClearFilters(event as any)}
>
Clear All Filters
</Button>
@@ -260,7 +265,6 @@ export const ListViewToolbar: React.FunctionComponent<IListViewToolbarProps> = (
)}
</ToolbarItem>
</ToolbarGroup>
- </ToolbarSection>
</Toolbar>
);
};
