@native-html/table-plugin
Version:
🔠A WebView-based plugin to render tables in react-native-render-html
30 lines (21 loc) • 3.4 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@native-html/table-plugin](./table-plugin.md) > [TableConfig](./table-plugin.tableconfig.md)
## TableConfig interface
This object defines how the table component can be customized.
<b>Signature:</b>
```typescript
export interface TableConfig
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [animationDuration?](./table-plugin.tableconfig.animationduration.md) | number | <i>(Optional)</i> The animation duration in milliseconds when infered height value changes. See [TableConfig.computeContainerHeight](./table-plugin.tableconfig.computecontainerheight.md)<!-- -->. |
| [animationType?](./table-plugin.tableconfig.animationtype.md) | 'none' \| 'layout' \| 'animated' | <i>(Optional)</i> What kind of animation should be used when height is changed? <ul> <li> <b>layout</b>: use native <code>LayoutAnimation</code>. This is the best option performance-wise, but requires some setup. See https://facebook.github.io/react-native/docs/layoutanimation. </li> <li> <b>animated</b>: use <code>Animated</code> module from react-native. </li> <li> <b>none</b>: no animations are performed. </li> </ul> |
| [computeContainerHeight?](./table-plugin.tableconfig.computecontainerheight.md) | (state: [TableContentHeightState](./table-plugin.tablecontentheightstate.md)<!-- -->) => number \| null | <i>(Optional)</i> A function which will compute container's height given the table content height. |
| [computeHeuristicContentHeight?](./table-plugin.tableconfig.computeheuristiccontentheight.md) | (state: [HTMLTableStats](./table-plugin.htmltablestats.md)<!-- -->) => number | <i>(Optional)</i> A function to compute approximate content height before the real content height has been fetched on DOM mount. |
| [cssRules?](./table-plugin.tableconfig.cssrules.md) | string | <i>(Optional)</i> Override default CSS rules with this prop. |
| [displayMode?](./table-plugin.tableconfig.displaymode.md) | 'normal' \| 'embedded' \| 'expand' | <i>(Optional)</i> Determine how the width of the table is constrained (or not).<ul> <li> <b>normal</b>: the table will have no peculiar constrain on <code>width</code> or <code>maxWidth</code>. </li> <li> <b>embedded</b>: the table acts like a width-constrained embedded (React Native Render HTML RFC001), with <code>maxWidth</code> determined by <code>contentWidth</code> and <code>computeEmbeddedMaxWidth</code>. </li> <li> <b>expand</b>: like <b>embedded</b>, but with <code>width</code> set to <code>maxWidth</code>. This can be useful to have a center-aligned table on wide screens. </li> </ul> |
| [maxScale?](./table-plugin.tableconfig.maxscale.md) | boolean | <i>(Optional)</i> Max zoom scale (must be greater than 1). |
| [style?](./table-plugin.tableconfig.style.md) | StyleProp<ViewStyle> | <i>(Optional)</i> Container style. |
| [tableStyleSpecs?](./table-plugin.tableconfig.tablestylespecs.md) | [TableStyleSpecs](./table-plugin.tablestylespecs.md) | <i>(Optional)</i> Specs to generate css rules.<img src="https://raw.githubusercontent.com/native-html/table-plugin/master/images/TableStyleSpecs.png" /> |
| [webViewProps?](./table-plugin.tableconfig.webviewprops.md) | any | <i>(Optional)</i> Any props you'd like to pass to the <code>WebView</code> component. |