From 7783154afc60f96786810be9db9e182983fa773d Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Tue, 28 Sep 2021 15:09:37 +0530 Subject: [PATCH] Minor linting changes in Table.jsx (#859) --- .../src/Editor/Components/Table/Table.jsx | 188 +++++++++--------- 1 file changed, 95 insertions(+), 93 deletions(-) diff --git a/frontend/src/Editor/Components/Table/Table.jsx b/frontend/src/Editor/Components/Table/Table.jsx index 7e399042ec..beb0de4c1d 100644 --- a/frontend/src/Editor/Components/Table/Table.jsx +++ b/frontend/src/Editor/Components/Table/Table.jsx @@ -543,55 +543,55 @@ export function Table({ const leftActionsCellData = leftActions().length > 0 ? [ - { - id: 'leftActions', - Header: 'Actions', - accessor: 'edit', - width: columnSizes.leftActions || defaultColumn.width, - Cell: (cell) => { - return leftActions().map((action) => ( - - )); + { + id: 'leftActions', + Header: 'Actions', + accessor: 'edit', + width: columnSizes.leftActions || defaultColumn.width, + Cell: (cell) => { + return leftActions().map((action) => ( + + )); + }, }, - }, - ] + ] : []; const rightActionsCellData = rightActions().length > 0 ? [ - { - id: 'rightActions', - Header: 'Actions', - accessor: 'edit', - width: columnSizes.rightActions || defaultColumn.width, - Cell: (cell) => { - return rightActions().map((action) => ( - - )); + { + id: 'rightActions', + Header: 'Actions', + accessor: 'edit', + width: columnSizes.rightActions || defaultColumn.width, + Cell: (cell) => { + return rightActions().map((action) => ( + + )); + }, }, - }, - ] + ] : []; const optionsData = columnData.map((column) => column.columnOptions?.selectOptions); @@ -772,6 +772,8 @@ export function Table({ } return ( + // Does not require key as its already being passed by react-table via cellProps + // eslint-disable-next-line react/jsx-key 0 || showFilterButton || showDownloadButton) && ( -
-
-
- {(clientSidePagination || serverSidePagination) && ( - - )} -
- - {showBulkUpdateActions && Object.keys(componentState.changeSet || {}).length > 0 && ( -
- - -
+
+
+
+ {(clientSidePagination || serverSidePagination) && ( + )} +
-
- {showFilterButton && ( - showFilters()}> - - {filters.length > 0 && ( - - )} - - )} - {showDownloadButton && ( - exportData('csv', true)} - > - - - )} + {showBulkUpdateActions && Object.keys(componentState.changeSet || {}).length > 0 && ( +
+ +
+ )} + +
+ {showFilterButton && ( + showFilters()}> + + {filters.length > 0 && ( + + )} + + )} + {showDownloadButton && ( + exportData('csv', true)} + > + + + )}
- )} +
+ )} {isFiltersVisible && (