React-native-paper: [New Features] Datatable column width and text style for title and cell.

Created on 24 Jun 2019  路  4Comments  路  Source: callstack/react-native-paper

Describe the feature

Give the possibility to set the width of the columns with the percentages and pass the style of the text for the title and the cells

Motivation

I have some columns that have a lot of text and I would like them to be wider than the columns that have, ad example, only numbers, so that the text can be seen correctly.
Also give the possibility to set the number of lines of the text within the cells and the style of the text of the title and the cells, now in case I want to put the text centered, I can't.
Thank you

Related Issues

No related issues

Stale

Most helpful comment

Hey @cristinaITdeveloper. I opened a pull request with the feature you proposed. Unfortunately we cannot add the numberOfLines prop because it's not consistent with the guidelines. As for the percentages for cell width there is a style prop on the cell component, to which you can pass a style object with flex property, so you should be able to make your cells wider or narrower without using percentages.

All 4 comments

I agree with this feature request, it would be nice to be able to pass in props to configure this.

I would love to have this feature as well

Hey @cristinaITdeveloper. I opened a pull request with the feature you proposed. Unfortunately we cannot add the numberOfLines prop because it's not consistent with the guidelines. As for the percentages for cell width there is a style prop on the cell component, to which you can pass a style object with flex property, so you should be able to make your cells wider or narrower without using percentages.

Hello 馃憢, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

Was this page helpful?
0 / 5 - 0 ratings