2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-05 13:10:57 +00:00

UI improvement for column selection in tables (#9925)

- Limit max height of dropdown
This commit is contained in:
Oliver
2025-07-01 22:03:22 +10:00
committed by GitHub
parent 803b688ed7
commit 0683140278

View File

@ -1,5 +1,5 @@
import { t } from '@lingui/core/macro';
import { ActionIcon, Checkbox, Menu, Tooltip } from '@mantine/core';
import { ActionIcon, Checkbox, Divider, Menu, Tooltip } from '@mantine/core';
import { IconAdjustments } from '@tabler/icons-react';
export function TableColumnSelect({
@ -19,8 +19,9 @@ export function TableColumnSelect({
</ActionIcon>
</Menu.Target>
<Menu.Dropdown>
<Menu.Dropdown style={{ maxHeight: '400px', overflowY: 'auto' }}>
<Menu.Label>{t`Select Columns`}</Menu.Label>
<Divider />
{columns
.filter((col) => col.switchable ?? true)
.map((col) => (