Fix ViewPicker create mode: view type switcher (#4821)

In this PR, I'm fixing two things on the ViewPicker in Create mode:
- if the Dropdown has no max height, it should not be scrollable (which
is causing issue with inner dropdowns being cut by overflow: hidden
- if the user has changed the icon, the type or the name of the view,
consider the create form as isDirty and prevent its value to be
overriden by re-renders (cache updates for example)
This commit is contained in:
Charles Bochet
2024-04-04 18:32:55 +02:00
committed by GitHub
parent 1f98bc899d
commit 48b1be9917
6 changed files with 51 additions and 13 deletions

View File

@ -45,11 +45,17 @@ export const DropdownMenuItemsContainer = ({
}) => {
return (
<StyledDropdownMenuItemsExternalContainer hasMaxHeight={hasMaxHeight}>
<StyledScrollWrapper>
{hasMaxHeight ? (
<StyledScrollWrapper>
<StyledDropdownMenuItemsInternalContainer>
{children}
</StyledDropdownMenuItemsInternalContainer>
</StyledScrollWrapper>
) : (
<StyledDropdownMenuItemsInternalContainer>
{children}
</StyledDropdownMenuItemsInternalContainer>
</StyledScrollWrapper>
)}
</StyledDropdownMenuItemsExternalContainer>
);
};