react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Is it possible to add more than one line for a particular DataTable Cell?

Open jota12x opened this issue 6 years ago • 7 comments

Problem Hello, I've been using react-native-paper for the past month with satisfying results, but now I am stumbled on a particular use case. I have a DataTable.Cell that needs to show more than one line at a time (imagine a list of food ingredients). Is this possible within the current version?

Approaches I tried to append line breaks without result. I also insert a Text with a numberOfLines attribute set to more than one but nothing happened as well. Inspecting the source code for DataTable.Cell , I found that there is a numberOfLines set to one by default , so I was wondering if that is the cause, because when I change the underlying Text Component on the debugger, it will show appropriately.

imagen

Thanks in advance

jota12x avatar Nov 25 '20 07:11 jota12x

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-paper
  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

github-actions[bot] avatar Nov 25 '20 07:11 github-actions[bot]

@jota12x DataTable.Cell is a View with just some styles to make it MD Guidelines compliant, but nothing fancy. If you need to make it multiline then use View instead.

Could you submit a PR adding this information to the DataTable.Cell docs? That would be awesome 🙏

Trancever avatar Nov 26 '20 08:11 Trancever

@Trancever Thanks for the answer. I will submit a PR later this week.

jota12x avatar Nov 27 '20 03:11 jota12x

The documentation was updated, so closing the issue.

jota12x avatar Dec 01 '20 02:12 jota12x

It works for me changing this value in the DataCell library code Screen Shot 2022-04-25 at 9 45 49 AM

hasbelcaro avatar Apr 25 '22 14:04 hasbelcaro

https://github.com/callstack/react-native-paper/issues/1038#issuecomment-1186243530

ramirobg94 avatar Jul 16 '22 17:07 ramirobg94

in my case changing the source code in the node_modules reflected only in debug mode but when I build the releaseApp there was still that issue

salmankhan526 avatar Jan 27 '25 12:01 salmankhan526