Skip to content

Commit b395a49

Browse files
committed
fix(table-plugin): mark displayMode field as optional
1 parent dcd899e commit b395a49

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/table-plugin/docs/table-plugin.tableconfig.displaymode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Determine how the width of the table is constrained (or not).
1111
<b>Signature:</b>
1212

1313
```typescript
14-
displayMode: 'normal' | 'embedded' | 'expand';
14+
displayMode?: 'normal' | 'embedded' | 'expand';
1515
```

packages/table-plugin/docs/table-plugin.tableconfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface TableConfig
2121
| [computeContainerHeight?](./table-plugin.tableconfig.computecontainerheight.md) | (state: [TableContentHeightState](./table-plugin.tablecontentheightstate.md)<!-- -->) =&gt; number \| null | <i>(Optional)</i> A function which will compute container's height given the table content height. |
2222
| [computeHeuristicContentHeight?](./table-plugin.tableconfig.computeheuristiccontentheight.md) | (state: [HTMLTableStats](./table-plugin.htmltablestats.md)<!-- -->) =&gt; number | <i>(Optional)</i> A function to compute approximate content height before the real content height has been fetched on DOM mount. |
2323
| [cssRules?](./table-plugin.tableconfig.cssrules.md) | string | <i>(Optional)</i> Override default CSS rules with this prop. |
24-
| [displayMode](./table-plugin.tableconfig.displaymode.md) | 'normal' \| 'embedded' \| 'expand' | 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> |
24+
| [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> |
2525
| [maxScale?](./table-plugin.tableconfig.maxscale.md) | boolean | <i>(Optional)</i> Max zoom scale (must be greater than 1). |
2626
| [sourceBaseUrl?](./table-plugin.tableconfig.sourcebaseurl.md) | string | <i>(Optional)</i> See https://git.io/JeCAG |
2727
| [style?](./table-plugin.tableconfig.style.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Container style. |

packages/table-plugin/etc/table-plugin.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface TableConfig {
7171
computeContainerHeight?: (state: TableContentHeightState) => number | null;
7272
computeHeuristicContentHeight?: (state: HTMLTableStats) => number;
7373
cssRules?: string;
74-
displayMode: 'normal' | 'embedded' | 'expand';
74+
displayMode?: 'normal' | 'embedded' | 'expand';
7575
maxScale?: boolean;
7676
sourceBaseUrl?: string;
7777
style?: StyleProp<ViewStyle>;

packages/table-plugin/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export interface TableConfig {
285285
*
286286
* @defaultvalue 'normal'
287287
*/
288-
displayMode: 'normal' | 'embedded' | 'expand';
288+
displayMode?: 'normal' | 'embedded' | 'expand';
289289
}
290290

291291
/**

0 commit comments

Comments
 (0)