JS side of Native Plugins

Summary:
Native plugins are plugins that can be written in mobile code alone (java/objc), provided they conform to a template, currently table is the only implemented template.

This adds support to flipper for handling them.

Reviewed By: danielbuechele

Differential Revision: D14502188

fbshipit-source-id: a96be9b06de1cecf7977c4ef2fd05b168f7f1330
This commit is contained in:
John Knox
2019-03-22 07:04:59 -07:00
committed by Facebook Github Bot
parent ba0cdf641d
commit 57a24769e8
8 changed files with 296 additions and 52 deletions

View File

@@ -130,21 +130,16 @@ export default class TableRow extends React.PureComponent<Props> {
{columnKeys.map(key => {
const col = row.columns[key];
if (col == null) {
throw new Error(
`Trying to access column "${key}" which does not exist on row. Make sure buildRow is returning a valid row.`,
);
}
const isFilterable = col.isFilterable || false;
const value = col ? col.value : '';
const title = col ? col.title : '';
const isFilterable = col?.isFilterable || false;
const value = col?.value;
const title = col?.title;
return (
<TableBodyColumnContainer
key={key}
title={title}
multiline={multiline}
justifyContent={col.align || 'flex-start'}
justifyContent={col?.align || 'flex-start'}
width={normaliseColumnWidth(columnSizes[key])}>
{isFilterable && onAddFilter != null ? (
<FilterRow addFilter={onAddFilter} filterKey={key}>