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

FlatTableHeader does not allow for content wrapping #6660

Open
1 task done
johnb-sage opened this issue Apr 4, 2024 · 2 comments
Open
1 task done

FlatTableHeader does not allow for content wrapping #6660

johnb-sage opened this issue Apr 4, 2024 · 2 comments

Comments

@johnb-sage
Copy link

Description

I'm using FlatTable and have some long header text that causes overflow at small viewports widths, such as 320px. Currently FlatTableHeader has white-space: nowrap so is not responsive.

Reproduction

https://stackblitz.com/edit/parsium-carbon-starter-rqdnyb?file=src%2FApp.tsx

Steps to reproduce

No response

JIRA ticket numbers (Sage only)

No response

Suggested solution

Ideally all components are responsive by default and we opt out of the native behaviour explicitly, so my preference is to remove the 'white-space: nowrap'.

Carbon version

128.3.1

Design tokens version

No response

Relevant browsers

Chrome

Relevant OSs

MacOS

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@johnb-sage johnb-sage added Bug triage Triage Required labels Apr 4, 2024
@DipperTheDan
Copy link
Contributor

Current work around is to use Typography.

<FlatTableHeader>
   <Typography
     as="span"
     whiteSpace="normal"
     fontWeight="700"
    >
    Some very long text that will need to wrap on a small screen
   </Typography>
</FlatTableHeader>

@nicktitchmarsh
Copy link
Contributor

FE-6422

@nicktitchmarsh nicktitchmarsh added On Backlog flat-table and removed triage Triage Required labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants