From f1f2f835cdfd908fec0047baa2a28012b5984d21 Mon Sep 17 00:00:00 2001 From: Amir Hadzic Date: Thu, 26 Oct 2017 22:39:52 +0200 Subject: [PATCH] Add option `plain` to wrap only the provided table column This means that bootstrap grid will not be used, and that page size, pagination, and filter components will not be added. You can add them in your component with PageSizeContainer, PaginationContainer, and FilterContainer components. --- README.md | 1 + src/sematable.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index ac3b6d3..51bc3e5 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,7 @@ You can style these components with `style` or `className`. ### Configuration properties: + - _plain_ if you want only the table component to be returned without page size, pagination, or filter (will not use bootstrap grid) - _showPageSize_ if page size select should be shown - _showFilter_ if text filter field should be shown - _defaultPageSize_ overrides the default page size (if not specified 5 will be used) diff --git a/src/sematable.js b/src/sematable.js index 6ef888b..0f518cc 100644 --- a/src/sematable.js +++ b/src/sematable.js @@ -185,6 +185,20 @@ const sematable = (tableName, TableComponent, columns, configs = {}) => { select, }; + if (configs.plain) { + return ( + + ); + } + return (