Support <table> tag
See original GitHub issueIssue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:61 (8 by maintainers)
Top Results From Across the Web
HTML table tag - W3Schools
A simple HTML table, containing two columns and two rows: <table> <tr> <th>Month</th> ... The <table> tag also supports the Global Attributes in...
Read more ><table>: The Table element - HTML - MDN Web Docs - Mozilla
The <table> HTML element represents tabular data — that is, ... Tag omission, None, both the starting and ending tag are mandatory.
Read more >HTML <table> Tag - W3docs
The <table> tag defines an HTML table. It contains other HTML elements that determine the structure of the table. The <tr> tag determines...
Read more >HTML - <table> Tag - Tutorialspoint
The table tag contains other tags that define the structure of the table. ... This tag supports all the global attributes described in...
Read more >HTML: <table> tag - TechOnTheNet
This HTML tutorial explains how to use the HTML element called the table tag with syntax and examples. The HTML table tag defines...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉 Good news everyone ; I’ve been working on this all the day through.
@native-html/table-plugin
released to npm, with support foronLinkPress
and autoheight! 🎉EDIT: The plugin has been renamed from
react-native-render-hmlt-table-bridge
to@native-html/table-plugin
@tclarke-scottlogic by looking at the source code, it looks like we don’t have a DOM at this point and all children are already pre-rendered React components. Doubtfully anything could be done here with existing renderers implementation.
I had a __ very simple __ tables, and managed to render as on exampe above https://github.com/archriss/react-native-render-html/issues/43#issuecomment-414986278
So in my case each
<tr>
was a<View>
styled as flexbox row (flexDirection: 'row',
) and<td>
was rendered as just a regular<View></View>
Note that this approach doesn’t renders the table, its rather a workaround to get the data inside tables visible and MAY work only for rendering of very simple tables:
Getting the tables rendered properly is hard, and WEB browsers actually do a quite sofisticated job on rendering the table layouts.
This flexbox workaround doesn’t covers all the tricky cases, primerraly because flexbox does alignment in single dimention (either horisontal or vertical), and for a table you need to do that in two dimentions simutanously (imagine a difference between CSS flexbox vs CSS grids).
React Native supports a quite limited variation of CSS flexbox and it is not possible to do anything like CSS grids here, so not even sure if reliable tables implementation is possible to add in observable future.