fix: remove redundant Fragment wrapper around comboButton in dropdowns (#9694)

Combobox.Button as={Fragment} requires its child to be a single real
element. Wrapping the button ternary in <>...</> made the child a
Fragment instance itself, which @headlessui/react v2 rejects with
"Passing props on Fragment!" at runtime. Dropping the wrapper fixes
priority, estimate, intake-state, member, module, cycle, state, and
project dropdowns.
This commit is contained in:
Atul Tameshwari
2026-08-27 14:54:18 +05:30
committed by GitHub
parent 1a76f29c79
commit 302f09b5b9
8 changed files with 16 additions and 48 deletions

View File

@@ -83,9 +83,7 @@ export const CycleDropdown = observer(function CycleDropdown(props: Props) {
handleClose();
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -130,9 +128,7 @@ export const CycleDropdown = observer(function CycleDropdown(props: Props) {
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -159,9 +159,7 @@ export const EstimateDropdown = observer(function EstimateDropdown(props: Props)
handleClose();
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -214,9 +212,7 @@ export const EstimateDropdown = observer(function EstimateDropdown(props: Props)
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -135,9 +135,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
handleClose();
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -197,9 +195,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions

View File

@@ -108,9 +108,7 @@ export const MemberDropdownBase = observer(function MemberDropdownBase(props: TM
}
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -159,9 +157,7 @@ export const MemberDropdownBase = observer(function MemberDropdownBase(props: TM
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -111,9 +111,7 @@ export const ModuleDropdownBase = observer(function ModuleDropdownBase(props: TM
}
}, [isOpen, isMobile]);
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -171,9 +169,7 @@ export const ModuleDropdownBase = observer(function ModuleDropdownBase(props: TM
/>
</DropdownButton>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -398,9 +398,7 @@ export function PriorityDropdown(props: Props) {
? BackgroundButton
: TransparentButton;
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -440,9 +438,7 @@ export function PriorityDropdown(props: Props) {
renderToolTipByDefault={renderByDefault}
/>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -174,9 +174,7 @@ export const ProjectDropdownBase = observer(function ProjectDropdownBase(props:
}
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -219,9 +217,7 @@ export const ProjectDropdownBase = observer(function ProjectDropdownBase(props:
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
<ComboDropDown

View File

@@ -136,9 +136,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
handleClose();
};
const comboButton = (
<>
{button ? (
const comboButton = button ? (
<button
ref={setReferenceElement}
type="button"
@@ -199,9 +197,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
)}
</DropdownButton>
</button>
)}
</>
);
);
return (
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions