Allow null TableRow sidebars
Summary: Makes the API a bit easier to use. Don't have to build an empty sidebar if you don't want one. Reviewed By: passy Differential Revision: D15064205 fbshipit-source-id: bd31c1aa97fd6d1c93717c10b268f49e44eb1299
This commit is contained in:
committed by
Facebook Github Bot
parent
4049720759
commit
f00ff72211
@@ -199,7 +199,7 @@ function renderToolbar(section: ToolbarSection) {
|
||||
|
||||
function renderSidebarForRow(rowData: RowData): Node {
|
||||
if (!rowData.sidebar) {
|
||||
throw new Error('renderSidebar used with missing rowData.sidebar');
|
||||
return null;
|
||||
}
|
||||
if (!Array.isArray(rowData.sidebar)) {
|
||||
throw new Error('typeof rowData.sidebar is not array as expected: ');
|
||||
|
||||
Reference in New Issue
Block a user