diff --git a/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.js b/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.js index 741139e63..c4a13e9d3 100644 --- a/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.js +++ b/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.js @@ -38,11 +38,13 @@ const HeaderDropdown = ({ const [isOpened, setIsOpened] = useState(false); const ref = useClickOutside(() => setIsOpened(false)); const [filter, setFilter] = useState(''); + const [isOnlyOneItem, setIsOnlyOneItem] = useState(false); const [selectedItem, setSelectedItem] = useState( data.find((item) => item?.id === value?.id) || data[0] || {}, ); - - const isOnlyOneItem = data.length === 1; + React.useEffect(() => { + setIsOnlyOneItem(data.length === 1); + }, [data]); const { classes, cx } = HeaderDropdownStyles( { @@ -98,7 +100,7 @@ const HeaderDropdown = ({ {item?.label} - {item?.description ? ( + {/* {item?.description ? ( - ) : null} + ) : null} */} diff --git a/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.styles.js b/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.styles.js index 635f3735c..dd3111b42 100644 --- a/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.styles.js +++ b/packages/leemons/src/common/HeaderDropdown/HeaderDropdown.styles.js @@ -70,6 +70,7 @@ const HeaderDropdownStyles = createStyles( itemComponentIcon: { color: theme.other.global.content.color.positive.default, fontSize: 14, + marginLeft: 24, }, itemComponentLabel: { fontFamily: 'Albert Sans',