pl-fe: optimizations

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-01-07 20:00:35 +01:00
parent 475e819b5b
commit dfa73a5c46
2 changed files with 12 additions and 10 deletions

View File

@ -317,7 +317,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
onKeyPress: handleKeyPress,
ref: refs.setReference,
});
}, [children]);
}, [children, !!items?.length, component]);
if (items?.length === 0 && !component) {
return null;
@ -343,7 +343,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
return (
<>
{children ? clonedChildren : (
{clonedChildren || (
<IconButton
disabled={disabled}
className={clsx({