Left menu and chip links (#12294)
Small optimization for faster loading (gaining ~80ms - average time of a click) It might seem a little over-engineered but there are a lot of edge cases and I couldn't find a simpler solution I also tried to tackle Link Chips but it's more complex so this will be for another PR
This commit is contained in:
@ -160,6 +160,7 @@ export const CurrentWorkspaceMemberFavorites = ({
|
||||
rightOptions={rightOptions}
|
||||
className="navigation-drawer-item"
|
||||
isRightOptionsDropdownOpen={isFavoriteFolderEditDropdownOpen}
|
||||
triggerEvent="CLICK"
|
||||
/>
|
||||
</FavoritesDroppable>
|
||||
)}
|
||||
@ -190,7 +191,7 @@ export const CurrentWorkspaceMemberFavorites = ({
|
||||
label={favorite.labelIdentifier}
|
||||
objectName={favorite.objectNameSingular}
|
||||
Icon={() => <FavoriteIcon favorite={favorite} />}
|
||||
to={favorite.link}
|
||||
to={isDragging ? undefined : favorite.link}
|
||||
active={index === selectedFavoriteIndex}
|
||||
subItemState={getNavigationSubItemLeftAdornment({
|
||||
index,
|
||||
@ -205,6 +206,7 @@ export const CurrentWorkspaceMemberFavorites = ({
|
||||
/>
|
||||
}
|
||||
isDragging={isDragging}
|
||||
triggerEvent="CLICK"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -50,7 +50,7 @@ export const CurrentWorkspaceMemberOrphanFavorites = () => {
|
||||
currentViewPath,
|
||||
favorite,
|
||||
)}
|
||||
to={favorite.link}
|
||||
to={isDragging ? undefined : favorite.link}
|
||||
rightOptions={
|
||||
<LightIconButton
|
||||
Icon={IconHeartOff}
|
||||
@ -60,6 +60,7 @@ export const CurrentWorkspaceMemberOrphanFavorites = () => {
|
||||
}
|
||||
objectName={favorite.objectNameSingular}
|
||||
isDragging={isDragging}
|
||||
triggerEvent="CLICK"
|
||||
/>
|
||||
</StyledOrphanFavoritesContainer>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user