Autodesk / Autodesk/react-base-table

Is is possible to set width to maxContent?

Open
#388 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

When rendering the table, I'd like the table width to match whatever the max content of the table contents is.
is this possible? Currently it seems using Autosizer, I need to set an actual number to the width attribute, but ultimately, like a div, I'd like to set it to "maxContent" or an equivalent.

Appreciate if you let me know how I might do that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names Autosizer and the table width attribute but no files or tests. Start by tracing how Autosizer handles width and compare the table's behavior with CSS max-content sizing. Done means documenting or implementing a supported way to size the table to its maximum content width, with behavior that is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.