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

[EuiBasicTable] Actions and expanding row icon buttons can overlap on mobile #8259

Open
acstll opened this issue Jan 7, 2025 · 1 comment
Labels
bug ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible

Comments

@acstll
Copy link
Contributor

acstll commented Jan 7, 2025

Describe the bug
When there are at least 2 primary actions and expanding rows on a EuiBasicTable, the icon buttons for these can overlap in the responsive/mobile breakpoints.

Impact and severity
There is end-user impact. The All actions button will be unreachable.

A possible workaround is to add a minimum height to the rows (via rowProps prop), in order to provide space for all icon buttons. But I believe this should be handled by the library.

rowProps={(item) => ({
    css: css`
        ${useEuiMaxBreakpoint('l')} {
            min-block-size: 10.875rem; /* magic number */
        }
    `,
})}

Environment and versions

  • EUI version: 98.2.1
  • React version: ~
  • Kibana version (if applicable): ~
  • Browser: ~
  • Operating System: ~

To Reproduce
You need a EuiBasicTable that has:

  • More than 2 actions with 2 marked a primary (isPrimary)
  • Expanding rows

And make sure you're viewing the responsive/mobile view.

Expected behavior
There should be no overlapping.

Minimum reproducible sandbox
https://codesandbox.io/p/sandbox/naughty-turing-p23zn4

Screenshots
Image

@acstll acstll added bug ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible labels Jan 7, 2025
@JasonStoltz
Copy link
Member

JasonStoltz commented Jan 7, 2025

Just a note: we recommended a workaround for this, we should circle back and clean it up when it's been completed.

around line 743 in the EuiInMemoryTable you can try and add the min height you suggested in your original message, like this:
import { useEuiMaxBreakpoint } from '@elastic/eui';

rowProps={(item) => ({
'data-test-subj': mlModelsTableRow row-${item.model_id},
css: css${useEuiMaxBreakpoint('l')} { min-block-size: 10.875rem; },
})}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible
Projects
None yet
Development

No branches or pull requests

2 participants