Skip to content

Commit

Permalink
fix(catalog): Fix for Log component selection in catalog list view
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamG640 committed May 28, 2024
1 parent 7545ea0 commit b3f64e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/Catalog/BaseCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const BaseCatalog: FunctionComponent<BaseCatalogProps> = (props) => {

const onSelectDataListItem = useCallback(
(_event: React.MouseEvent | React.KeyboardEvent, id: string) => {
const tile = props.tiles.find((tile) => tile.name === id);
const tile = props.tiles.find((tile) => tile.name + '-' + tile.type === id);
onTileClick(tile!);
},
[onTileClick, props.tiles],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/Catalog/DataListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const CatalogDataListItem: FunctionComponent<ICatalogDataListItemProps> =
<DataListItem
aria-labelledby={props.tile.name}
key={props.tile.name}
id={props.tile.name}
id={props.tile.name + '-' + props.tile.type}
className="catalog-data-list-item"
>
<DataListItemRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`DataListItem renders correctly 1`] = `
<li
aria-labelledby="tile-name"
class="pf-v5-c-data-list__item catalog-data-list-item"
id="tile-name"
id="tile-name-tile-type"
>
<div
class="pf-v5-c-data-list__item-row"
Expand Down

0 comments on commit b3f64e1

Please sign in to comment.