mirror of
https://github.com/makeplane/plane.git
synced 2026-08-29 10:08:51 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user