Skip to content

Commit

Permalink
Disable select/deselect all button when on openshift bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
karelhala committed Nov 7, 2024
1 parent 04a2e4b commit 5d4fbee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SmartComponents/FormComponents/BulkSelectButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import './BulkSelectButton.scss';
import { useSearchParams } from 'react-router-dom';

const BulkSelectButton = (props) => {
const formOptions = useFormApi();
Expand All @@ -12,10 +13,16 @@ const BulkSelectButton = (props) => {
type: 'button',
});

const [searchParams] = useSearchParams();

return (
<Button
className="pref-c-bulk-select-button"
variant="secondary"
isDisabled={
searchParams.get('bundle') === 'openshift' &&
searchParams.get('app') === 'cluster-manager'
}
{...input}
id={`bulk-select-${section}`}
onClick={() => onClick?.(formOptions, input)}
Expand Down

0 comments on commit 5d4fbee

Please sign in to comment.