Skip to content

TableView column does not respect minWidth #3368

@MBernardAdobe

Description

@MBernardAdobe

🐛 Bug Report

When a width is set on a Column in a V3 TableView, it seems to be the only thing considered when defining the width of that column, even if there is a minWidth also on that column. See the sandbox below:
https://codesandbox.io/s/react-spectrum-template-forked-cxfw8b?file=/src/App.js

🤔 Expected Behavior

The width of an element should be the greater of its calculated width, or the minWidth.

😯 Current Behavior

          <Column
            showDivider={true}
            minWidth={500}
            width={50}
          >

We would expect the column's width to be 500, but it is 50.

💁 Possible Solution

🔦 Context

I would like to make a table where column A and B are the same size, column C is half that size, and column D is at least 40px wide and otherwise half the size of C.

💻 Code Sample

https://codesandbox.io/s/react-spectrum-template-forked-cxfw8b?file=/src/App.js

🌍 Your Environment

Software Version(s)
react-spectrum 3.20.0
Browser Chrome
Operating System OS X 12.4

🧢 Your Company/Team

Adobe/AEP

🕷 Tracking Issue (optional)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions