maticzav / ink-table

📐A table component for Ink.
184 stars 32 forks source link

Provide a way to prevent table overflow #55

Open slaweet opened 4 years ago

slaweet commented 4 years ago

Current behaviour

When the contents of the table are more than terminal width, the rows overflow to multiple lines

Screenshot 2019-12-01 at 08 32 05

when I tried to use it on this project https://github.com/slaweet/calcGithubMetrics/commit/143db89c2d5c98fdc5c66206e764f708f3175b3c

Expected behaviour

There should be a way to ensure this won't happen.

I would expect to be able to specify how wrapping should be handled - something like <Box textWrap={...} > https://github.com/vadimdemedes/ink#wrapping

Not sure what should be the default wrapping and what other options can be provided, but the current behaviour definitely looks like a bug.

Note: I was trying to make the wrapping work with custom cell and skeleton props of Table, but I wasn't successful. Please let me know if there already is a way to do this.

maticzav commented 3 years ago

Hey 👋 ,

I'd be up for accepting a PR

Salman-Arshad commented 1 year ago

Any update?

maticzav commented 1 year ago

still open for PR 😄