medly / medly/medly-components

bug: table column width is calculated only based on the row data

Open
#601 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
80
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The width of the table column is calculated only based on the data for the row and because of that

To Reproduce

Provide step-by-step instructions to reproduce the bug:

  1. Create a table with medly components, the data should have value with less characters than the header for the column.
  2. See error
Expected behavior

Table column width should consider minimum of header characters / data & then only if fitContent prop is true the column width should consider data for the row and recalculate accordingly

Screenshots
Screenshot 2022-05-19 at 11 05 14 AM
Package versions
  • @medly-components/core: "^6.4.3"
  • @medly-components/forms: "^2.1.26"
  • @medly-components/layout: "^3.1.11"
  • @medly-components/loaders: "^1.6.7"
  • @medly-components/theme: "^5.0.0"
  • @medly-components/utils: "^2.1.1"

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

No source file or test is named. Locate the table component and its column-width calculation entry point, then reproduce the case with a header longer than its row value. Done means the column accounts for the header and the reported fitContent behavior is covered by the relevant table tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.