Skip to content

Commit

Permalink
Merge pull request #7014 from nixocio/ui_update_chip_group
Browse files Browse the repository at this point in the history
Update usage of new custom `ChipGroup`

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
softwarefactory-project-zuul[bot] authored May 14, 2020
2 parents 275c43b + ce7ea1f commit 30610f1
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ import { Link, useHistory } from 'react-router-dom';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';

import {
Button,
Chip,
ChipGroup,
List,
ListItem,
} from '@patternfly/react-core';
import { Button, Chip, List, ListItem } from '@patternfly/react-core';
import AlertModal from '../../../components/AlertModal';
import { CardBody, CardActionsRow } from '../../../components/Card';
import ChipGroup from '../../../components/ChipGroup';
import { VariablesDetail } from '../../../components/CodeMirrorInput';
import CredentialChip from '../../../components/CredentialChip';
import DeleteButton from '../../../components/DeleteButton';
Expand Down Expand Up @@ -161,7 +156,10 @@ function InventorySourceDetail({ inventorySource, i18n }) {
fullWidth
label={i18n._(t`Regions`)}
value={
<ChipGroup numChips={5}>
<ChipGroup
numChips={5}
totalChips={source_regions.split(',').length}
>
{source_regions.split(',').map(region => (
<Chip key={region} isReadOnly>
{region}
Expand All @@ -176,7 +174,10 @@ function InventorySourceDetail({ inventorySource, i18n }) {
fullWidth
label={i18n._(t`Instance filters`)}
value={
<ChipGroup numChips={5}>
<ChipGroup
numChips={5}
totalChips={instance_filters.split(',').length}
>
{instance_filters.split(',').map(filter => (
<Chip key={filter} isReadOnly>
{filter}
Expand All @@ -191,7 +192,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
fullWidth
label={i18n._(t`Only group by`)}
value={
<ChipGroup numChips={5}>
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
{group_by.split(',').map(group => (
<Chip key={group} isReadOnly>
{group}
Expand Down

0 comments on commit 30610f1

Please sign in to comment.