5.3.1 (2021-10-13)
- remove null from useHtmlTableProps return signature (dead condition) (52888c5)
5.3.0 (2021-06-08)
- table: support react-native-render-html@6.0.0-beta.0 (6de42c8)
5.2.0 (2021-05-21)
- support react-native-render-html@6.0.0-alpha.25; beware of upstream breaking changes (53e322c)
5.1.0 (2021-04-17)
- table: support react-native-render-html@6.0.0-alpha.23 (604e76e)
5.0.3 (2021-04-17)
- restrict to react-native-render-html < 6.0.0-alpha.23 (3a8d9f8)
5.0.2 (2021-04-17)
- restrict compatible versions of react-native-render-html (032c4ed)
5.0.1 (2021-02-18)
- replace outdated type import
RenderHTMLPassedProps(872bc96)
5.0.0 (2021-02-08)
- table-plugin: automatically handle relative URLs (000b9b4)
- table-plugin:
sourceBaseUrlhas been moved fromTableConfigtoHTMLTableBaseProps. It means you cannot override this value withrenderersProps.table.sourceBaseUrlanymore. Use a custom renderer withuseHtmlTablePropshook and HTMLTable component to override this value manually, but you probably shouldn't since the new foundry engines allows it automatically. If your html source is inline, usesource.baseUrlinstead, so that every relative URL will be normalized against this base. Read https://git.io/JtwG0 for a detailed description.
4.0.3 (2021-02-07)
4.0.2 (2021-02-07)
4.0.1 (2021-02-07)
- table-plugin: default htmlAttribs would cause infinite re-renders (cb23e01)
- table-plugin: pass anchor attributes and target to
onLinkPress(0e45cde) - table-plugin: upgrade webshell to v2.3.0 fixing potential infinite re-renders (ffd8343)
4.0.0 (2021-02-06)
- table-plugin: mark displayMode field as optional (b395a49)
- table-plugin: support react-native-render-html 6.x (1526efe)
- table-plugin: -
extractHtmlTablePropshas been dropped in favor ofuseHtmlTablePropshook for reusability.
IGNORED_TAGSis not exported anymore, and not necessary.- requires
react-native0.63.x and above - new
tableModelexport for the new custom renderers API
3.1.0 (2020-12-05)
- table-plugin: add new
tableConfigargument to extractHtmlTableProps (366c156) - table-plugin: new
displayModevalue, "embedded" (0ec4937)
3.0.1 (2020-12-05)
- Rework version range for react-native-render-html
This release requires react-native-render-html ≥ 5.0.0! Be aware, its API has changed a little:
import React from 'react';
import { ScrollView } from 'react-native';
import HTML from 'react-native-render-html';
import table, { IGNORED_TAGS } from '@native-html/table-plugin';
import WebView from 'react-native-webview';
const html = `
<table>
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
</tr>
</table>
`;
const htmlProps = {
WebView,
renderers: {
table
},
ignoredTags: IGNORED_TAGS,
renderersProps: {
table: {
// Put the table config here (previously,
// the first argument of makeTableRenderer)
}
}
};
export const Example = () => (
<ScrollView>
<HTML source={{ html }} {...htmlProps} />
</ScrollView>
);- table-plugin: new lightweight API for react-native-render-html v5.0 (a7fa70a)
- table-plugin: new displayMode prop and compliance with RFC001 (1de3df0)
- table-plugin: the component now inherits from
tagsStylesandclassesStyleswhen matched
- table-plugin:
makeTableRendererandmakeCustomTableRendererhave been dropped in favor of the defaulttablerenderer export andextractHtmlTablePropfunction for custom renderers. This release takes advantage of the availability ofdomNodein custom renderers and the newdomNodeToHTMLStringutility available in react-native-render-html. Configuration for the table renderer is now read fromrenderersProps.tableprop of theHTMLcomponent.
2.1.4 (2020-10-08)
- Ornamental changes (README)
2.1.3 (2020-10-08)
- Ornamental changes (README)
2.1.2 (2020-10-08)
- Add README.MD in bundle
2.1.1 (2020-10-08)
- Upgrade @formidable-webview/* dependencies
2.1.0 (2020-10-03)
- add
TableConfig.maxScaleoption to allow zooming in tables (6338296)
2.0.1 (2020-10-01)
- Upgrade
@formidable-webview/webshell(ef53677).
2.0.0 (2020-09-28)
- implement HTMLTable component with webshell 2.0
useAutoheight(0d038ba), closes #16
- better customizability of table style specs (2b66c10), thanks @nadav2051! closes #10
- removed
TableStyleSpecs.borderWidthPxin favor ofrowsBorderWidthPx,columnsBorderWidthPxandouterBorderWidthPx - This plugin now requires React Native 0.59+ because it uses hooks internally.
1.0.4 (2020-08-20)
1.0.3 (2020-08-20)
- deps: move metro-react-native-babel-transformer to devDependencies (c64e4c0)
1.0.2 (2020-08-19)
Fix misconfigured repository field in package.json, responsible for bad relative links resolutions in npmjs and changelog generators.
1.0.0 (2020-08-19)
- restructure source files and comply with api-extractor (644e2ff)
- new TableConfig API to configure height computation (07264fb)
WebViewComponentconfig field has been renamed toWebView.autoheight,maxHeightanddefaultHeighthave been dropped in favour ofcomputeContainerHeight. This function gives more flexibility to library users, providing a way to set height at different steps of the component lifecycle. Also,useLayoutAnimationhas been dropped in favour ofanimationType, giving the opportunity to completely switch off animations. Moreover, a new prop,computeHeuristicContentHeight, allows even more fine-grain control on the height computation logic and more specifically, when the accurate content height is not yet available. Finally,animationDurationnow replacestransitionDurationto make the semantic link with animationType more explicit.- remove export of domToHTML
0.6.1 (2020-07-03)
- merge default table style specs to user-provided
tableStyleSpecs(f2b9d82)
0.6.0 (2020-07-03)
- empty 'cssRules' prop is ignored (469ec9a)
- script injection resulting in syntax error (875f18f)
- table borders correctly rendered left and bottom (14422f8)
- fontSizePx attribute in tableStyleSpecs (104bcab)
- split fitContainer prop in fitContainerHeight and fitContainerWidth (2bdb077)
fitContainerattribute oftableStyleSpecsconfig has been split intofitContainerWidthandfitContainerHeight.- TypeScript definitions for
react-native-render-htmlare not embedded anymore. Please upgrade toreact-native-render-html@4.2.1.
- restrict
react-native-render-htmlpeer version
- add
renderersPropstoHTMLTableand custom tables.
0.5.1 (2019-11-20)
- rename
androidSourceBaseUrlprop tosourceBaseUrl(692190e)
- rename
androidSourceBaseUrlprop tosourceBaseUrl.
- Fix HTML.onLinkPress does not get fired if link contains html elements, #5
- Use const TABLE_TAGS for IGNORED_TAGS, #1 by @donni106
- Get rid of deprecated
componentWillUpdatemethod inHTMLTablecomponent; - Fix inconsistent odd/even rules;
- Run injected javascript in a closure, #4;
- Add new TableStyleSpecs properties:
- Add cellPaddingEm, borderWidthPx, thOddBackground, thOddColor;
- BREAKING remove thBackground and thColor;
- Add thEvenBackground and thEvenColor.
- Add
selectableTextfield intableStyleSpecsconfig option; - Export
cssRulesFromSpecsanddefaultTableStylesSpecs; - Add FAQ to readme;
- Added
numOfRows,numOfColumnsandnumOfCharstoHTMLTableprops, which can help trigger rendering logic depending on table stats; - Export
makeCustomTableRendererto customize table component; - Added a new example with custom complex table.