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();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -130,9 +128,7 @@ export const CycleDropdown = observer(function CycleDropdown(props: Props) {
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -159,9 +159,7 @@ export const EstimateDropdown = observer(function EstimateDropdown(props: Props)
|
|||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -214,9 +212,7 @@ export const EstimateDropdown = observer(function EstimateDropdown(props: Props)
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -135,9 +135,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
|
|||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -197,9 +195,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions
|
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions
|
||||||
|
|||||||
@@ -108,9 +108,7 @@ export const MemberDropdownBase = observer(function MemberDropdownBase(props: TM
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -159,9 +157,7 @@ export const MemberDropdownBase = observer(function MemberDropdownBase(props: TM
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -111,9 +111,7 @@ export const ModuleDropdownBase = observer(function ModuleDropdownBase(props: TM
|
|||||||
}
|
}
|
||||||
}, [isOpen, isMobile]);
|
}, [isOpen, isMobile]);
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -171,9 +169,7 @@ export const ModuleDropdownBase = observer(function ModuleDropdownBase(props: TM
|
|||||||
/>
|
/>
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -398,9 +398,7 @@ export function PriorityDropdown(props: Props) {
|
|||||||
? BackgroundButton
|
? BackgroundButton
|
||||||
: TransparentButton;
|
: TransparentButton;
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -440,9 +438,7 @@ export function PriorityDropdown(props: Props) {
|
|||||||
renderToolTipByDefault={renderByDefault}
|
renderToolTipByDefault={renderByDefault}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -174,9 +174,7 @@ export const ProjectDropdownBase = observer(function ProjectDropdownBase(props:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -219,9 +217,7 @@ export const ProjectDropdownBase = observer(function ProjectDropdownBase(props:
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComboDropDown
|
<ComboDropDown
|
||||||
|
|||||||
@@ -136,9 +136,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
|
|||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const comboButton = (
|
const comboButton = button ? (
|
||||||
<>
|
|
||||||
{button ? (
|
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -199,9 +197,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown
|
|||||||
)}
|
)}
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions
|
// oxlint-disable-next-line jsx_a11y/no-static-element-interactions
|
||||||
|
|||||||
Reference in New Issue
Block a user