Skip to content

Commit

Permalink
Merge pull request #2731 from epam/2708-presetspanel-issues-with-long…
Browse files Browse the repository at this point in the history
…-names-and-n-more-dropdown

[PresetsPanel]: Fixed icons being cut off and dropdown not scrolling
  • Loading branch information
AlekseyManetov authored Jan 15, 2025
2 parents 575419b + 046855c commit f8604c4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
**What's New**
* [MainMenuAvatar]: added `RawProps` prop
* [MainMenuButton]: removed unnecessary `role` and `aria-haspopup` attributes ([#2733](https://github.com/epam/UUI/pull/2733))
* [MainMenuButton]: Add `aria-current` attribute with value `page` for active links ([#2734](https://github.com/epam/UUI/pull/2734))
* [CountIndicator]: text size increased for prop 'size' 12px from 8px to 10px
* [MainMenuButton] Add `aria-current` attribute with value `page` for active links ([#2734](https://github.com/epam/UUI/pull/2734))
* [DropdownMenuBody]: added `maxHeight` prop


**What's Fixed**
* [useForm]: reset serverValidationState by valid form save action
* [DropdownMenuButton]: fixed cropping of icons located to the right of the text
* [PresetsPanel]: added scroll to `More` dropdown


# 5.12.1 - 17.12.2024
Expand Down
6 changes: 3 additions & 3 deletions uui/components/filters/PresetPanel/PresetsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { i18n } from '../../../i18n';
import {
DataTableState, IHasRawProps, IPresetsApi, ITablePreset, orderBy,
} from '@epam/uui-core';
import { AdaptiveItemProps, AdaptivePanel, ScrollBars } from '@epam/uui-components';
import { AdaptiveItemProps, AdaptivePanel } from '@epam/uui-components';
import css from './PresetsPanel.module.scss';
import { Button } from '../../buttons';
import { FlexCell, FlexRow } from '../../layout';
import { FlexCell, FlexRow, ScrollBars } from '../../layout';
import { Dropdown, DropdownMenuBody, DropdownMenuButton } from '../../overlays';
import { Preset } from './Preset';
import { PresetInput } from './PresetInput';
Expand Down Expand Up @@ -65,7 +65,7 @@ export function PresetsPanel(props: PresetsPanelProps) {
</FlexRow>
) }
renderBody={ (propsBody) => (
<DropdownMenuBody minWidth={ 230 } { ...propsBody }>
<DropdownMenuBody minWidth={ 230 } maxHeight={ 300 } { ...propsBody }>
<ScrollBars>
{hiddenItems.map((hiddenItem) => (
<DropdownMenuButton
Expand Down
1 change: 1 addition & 0 deletions uui/components/overlays/DropdownMenu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@

.icon {
justify-content: flex-start;
flex-shrink: 0;
@include withActive;

svg {
Expand Down
2 changes: 1 addition & 1 deletion uui/components/overlays/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface IDropdownMenuItemProps extends IDropdownTogglerProps, IHasCapti
indent?: boolean;
}

export interface DropdownMenuContainerProps extends VPanelProps, IHasChildren, DropdownBodyProps, Pick<DropdownContainerProps, 'focusLock'> {
export interface DropdownMenuContainerProps extends VPanelProps, IHasChildren, DropdownBodyProps, Pick<DropdownContainerProps, 'focusLock' | 'maxHeight'> {
closeOnKey?: React.KeyboardEvent<HTMLElement>['key'];
minWidth?: number;
}
Expand Down

0 comments on commit f8604c4

Please sign in to comment.