mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
Upgrades pf deps to latest
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
Checkbox,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import VerticalSeparator from '../VerticalSeparator';
|
||||
|
||||
const CheckboxListItem = ({
|
||||
itemId,
|
||||
name,
|
||||
@@ -13,19 +15,18 @@ const CheckboxListItem = ({
|
||||
onSelect,
|
||||
}) => (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<div className="pf-c-data-list__check">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
onChange={onSelect}
|
||||
aria-label={i18n._(t`selected ${itemId}`)}
|
||||
id={`selectd-${itemId}`}
|
||||
value={itemId}
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
</div>
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
onChange={onSelect}
|
||||
aria-label={i18n._(t`selected ${itemId}`)}
|
||||
id={`selectd-${itemId}`}
|
||||
value={itemId}
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
<VerticalSeparator />
|
||||
<div className="pf-c-data-list__cell">
|
||||
<label htmlFor={`selectd-${itemId}`} className="check-action-item">
|
||||
<b>{name}</b>
|
||||
|
||||
@@ -109,7 +109,7 @@ class Pagination extends Component {
|
||||
style
|
||||
} = this.props;
|
||||
const { value, isOpen } = this.state;
|
||||
let opts;
|
||||
let opts = [];
|
||||
if (pageSizeOptions) {
|
||||
opts = pageSizeOptions.slice().reverse().filter(o => o !== page_size);
|
||||
}
|
||||
@@ -125,6 +125,15 @@ class Pagination extends Component {
|
||||
const itemMin = ((page - 1) * page_size) + 1;
|
||||
const itemMax = itemMin + itemCount - 1;
|
||||
|
||||
const dropdownItems = opts.map(option => (
|
||||
<DropdownItem
|
||||
key={option}
|
||||
component="button"
|
||||
>
|
||||
{option}
|
||||
</DropdownItem>
|
||||
));
|
||||
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
@@ -145,16 +154,8 @@ class Pagination extends Component {
|
||||
{page_size}
|
||||
</DropdownToggle>
|
||||
)}
|
||||
>
|
||||
{opts.map(option => (
|
||||
<DropdownItem
|
||||
key={option}
|
||||
component="button"
|
||||
>
|
||||
{option}
|
||||
</DropdownItem>
|
||||
))}
|
||||
</Dropdown>
|
||||
dropdownItems={dropdownItems}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="awx-pagination__counts">
|
||||
|
||||
Reference in New Issue
Block a user