5.3.1 (2021-10-13)
- remove null from useHtmlTableProps return signature (dead condition) (52888c5)
5.3.0 (2021-06-08)
- table: support [email protected] (6de42c8)
5.2.0 (2021-05-21)
- support [email protected]; beware of upstream breaking changes (53e322c)
5.1.0 (2021-04-17)
- table: support [email protected] (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:
sourceBaseUrl
has been moved fromTableConfig
toHTMLTableBaseProps
. It means you cannot override this value withrenderersProps.table.sourceBaseUrl
anymore. Use a custom renderer withuseHtmlTableProps
hook 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.baseUrl
instead, 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: -
extractHtmlTableProps
has been dropped in favor ofuseHtmlTableProps
hook for reusability.
IGNORED_TAGS
is not exported anymore, and not necessary.- requires
react-native
0.63.x and above - new
tableModel
export for the new custom renderers API
3.1.0 (2020-12-05)
- table-plugin: add new
tableConfig
argument to extractHtmlTableProps (366c156) - table-plugin: new
displayMode
value, "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
tagsStyles
andclassesStyles
when matched
- table-plugin:
makeTableRenderer
andmakeCustomTableRenderer
have been dropped in favor of the defaulttable
renderer export andextractHtmlTableProp
function for custom renderers. This release takes advantage of the availability ofdomNode
in custom renderers and the newdomNodeToHTMLString
utility available in react-native-render-html. Configuration for the table renderer is now read fromrenderersProps.table
prop of theHTML
component.
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.maxScale
option 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.borderWidthPx
in favor ofrowsBorderWidthPx
,columnsBorderWidthPx
andouterBorderWidthPx
- 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)
WebViewComponent
config field has been renamed toWebView
.autoheight
,maxHeight
anddefaultHeight
have 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,useLayoutAnimation
has 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,animationDuration
now replacestransitionDuration
to 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)
fitContainer
attribute oftableStyleSpecs
config has been split intofitContainerWidth
andfitContainerHeight
.- TypeScript definitions for
react-native-render-html
are not embedded anymore. Please upgrade to[email protected]
.
- restrict
react-native-render-html
peer version
- add
renderersProps
toHTMLTable
and custom tables.
0.5.1 (2019-11-20)
- rename
androidSourceBaseUrl
prop tosourceBaseUrl
(692190e)
- rename
androidSourceBaseUrl
prop 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
componentWillUpdate
method inHTMLTable
component; - 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
selectableText
field intableStyleSpecs
config option; - Export
cssRulesFromSpecs
anddefaultTableStylesSpecs
; - Add FAQ to readme;
- Added
numOfRows
,numOfColumns
andnumOfChars
toHTMLTable
props, which can help trigger rendering logic depending on table stats; - Export
makeCustomTableRenderer
to customize table component; - Added a new example with custom complex table.