mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-06 05:30:56 +00:00
UI improvement for column selection in tables (#9925)
- Limit max height of dropdown
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/core/macro';
|
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';
|
import { IconAdjustments } from '@tabler/icons-react';
|
||||||
|
|
||||||
export function TableColumnSelect({
|
export function TableColumnSelect({
|
||||||
@ -19,8 +19,9 @@ export function TableColumnSelect({
|
|||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|
||||||
<Menu.Dropdown>
|
<Menu.Dropdown style={{ maxHeight: '400px', overflowY: 'auto' }}>
|
||||||
<Menu.Label>{t`Select Columns`}</Menu.Label>
|
<Menu.Label>{t`Select Columns`}</Menu.Label>
|
||||||
|
<Divider />
|
||||||
{columns
|
{columns
|
||||||
.filter((col) => col.switchable ?? true)
|
.filter((col) => col.switchable ?? true)
|
||||||
.map((col) => (
|
.map((col) => (
|
||||||
|
Reference in New Issue
Block a user