Skip to content

Commit

Permalink
Fixes #35575 - Always show toggle group when host is non-library (Kat…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz authored Oct 6, 2022
1 parent e231497 commit 942cdda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webpack/components/Table/TableWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { orgId } from '../../services/api';
const TableWrapper = ({
actionButtons,
alwaysShowActionButtons,
alwaysShowToggleGroup,
toggleGroup,
children,
metadata,
Expand Down Expand Up @@ -62,7 +63,7 @@ const TableWrapper = ({
const hideToolbar = !searchQuery && !filtersAreActive &&
allTableProps.status === STATUS.RESOLVED && total === 0;
const showActionButtons = actionButtons && (alwaysShowActionButtons || !hideToolbar);
const showToggleGroup = toggleGroup && !hideToolbar;
const showToggleGroup = toggleGroup && (alwaysShowToggleGroup || !hideToolbar);
const paginationParams = useCallback(() =>
({ per_page: perPage, page }), [perPage, page]);
const prevRequest = useRef({});
Expand Down Expand Up @@ -275,6 +276,7 @@ TableWrapper.propTypes = {
searchPlaceholderText: PropTypes.string,
actionButtons: PropTypes.node,
alwaysShowActionButtons: PropTypes.bool,
alwaysShowToggleGroup: PropTypes.bool,
toggleGroup: PropTypes.node,
children: PropTypes.node,
// additionalListeners are anything that should trigger another API call, e.g. a filter
Expand Down Expand Up @@ -319,6 +321,7 @@ TableWrapper.defaultProps = {
searchPlaceholderText: undefined,
actionButtons: null,
alwaysShowActionButtons: true,
alwaysShowToggleGroup: false,
toggleGroup: null,
displaySelectAllCheckbox: false,
selectedCount: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ export const ErrataTab = () => {
displaySelectAllCheckbox={showActions}
requestKey={HOST_ERRATA_KEY}
alwaysShowActionButtons={false}
alwaysShowToggleGroup={hostIsNonLibrary}
>
<Thead>
<Tr ouiaId="row-header">
Expand Down

0 comments on commit 942cdda

Please sign in to comment.