Skip to content

Commit

Permalink
Fix broken QE selector
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Bolton <ibolton@redhat.com>
  • Loading branch information
ibolton336 committed Jun 17, 2024
1 parent 22d308b commit 1e4f9ec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export interface Target {
labels?: TargetLabel[];
image?: RulesetImage;
ruleset: Ruleset;
provider?: string[];
provider?: string;
}

export interface Metadata {
Expand Down
4 changes: 3 additions & 1 deletion client/src/app/components/SimpleSelectCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ export const SimpleSelectCheckbox: React.FC<ISimpleSelectBasicProps> = ({
onOpenChange={setIsOpen}
toggle={(toggleref: React.Ref<MenuToggleElement>) => (
<MenuToggle
aria-label={toggleAriaLabel}
id={toggleId}
ref={toggleref}
onClick={onToggleClick}
style={{ width: width && width + "px" }}
isExpanded={isOpen}
id={toggleId}
>
<span className={spacing.mrSm}>{placeholderText}</span>
{selectedItems.length > 0 && (
Expand All @@ -110,6 +111,7 @@ export const SimpleSelectCheckbox: React.FC<ISimpleSelectBasicProps> = ({
<SelectList>
{selectOptions.map((option, index) => (
<SelectOption
id={`checkbox-for-${option.value}`}
hasCheckbox
key={option.value}
isFocused={index === 0}
Expand Down
3 changes: 2 additions & 1 deletion client/src/app/components/target-card/target-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ export const TargetCard: React.FC<TargetCardProps> = ({

return (
<Card
id={`target-card-${target.name.replace(/\s/g, "-")}`}
onClick={handleCardClick}
isSelectable
isSelected={isCardSelected}
className="pf-v5-l-stack pf-v5-l-stack__item pf-m-fill"
>
<CardHeader
selectableActions={{
selectableActionId: "" + target.id,
selectableActionId: "target-name-" + target.name,
selectableActionAriaLabelledby: `${target.name}-selectable-action-label`,
isChecked: isCardSelected,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const SetTargets: React.FC<SetTargetsProps> = ({ applications }) => {
onChange={(selection) => {
setProvider(selection as string[]);
}}
toggleId="language-select-toggle"
toggleId="action-select-toggle"
/>
{values.selectedTargets.length === 0 &&
values.customRulesFiles.length === 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export const CustomTargetForm: React.FC<CustomTargetFormProps> = ({
},
}),
},
provider: [providerType] || ["Java"],
provider: providerType || "Java",
};

if (target) {
Expand Down

0 comments on commit 1e4f9ec

Please # to comment.