Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PresetsPanel]: Fixed icons being cut off and dropdown not scrolling #2731

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading