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:
@ -45,11 +45,17 @@ export const DropdownMenuItemsContainer = ({
|
||||
}) => {
|
||||
return (
|
||||
<StyledDropdownMenuItemsExternalContainer hasMaxHeight={hasMaxHeight}>
|
||||
<StyledScrollWrapper>
|
||||
{hasMaxHeight ? (
|
||||
<StyledScrollWrapper>
|
||||
<StyledDropdownMenuItemsInternalContainer>
|
||||
{children}
|
||||
</StyledDropdownMenuItemsInternalContainer>
|
||||
</StyledScrollWrapper>
|
||||
) : (
|
||||
<StyledDropdownMenuItemsInternalContainer>
|
||||
{children}
|
||||
</StyledDropdownMenuItemsInternalContainer>
|
||||
</StyledScrollWrapper>
|
||||
)}
|
||||
</StyledDropdownMenuItemsExternalContainer>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user