From 43eefe8338d6c876813a45e476a63eaa28e1065a Mon Sep 17 00:00:00 2001 From: ryanml Date: Thu, 8 Feb 2018 19:13:09 -0700 Subject: [PATCH] Fixing Issue #13074, allows for non sortable columns, excluding the Actions column on the ledger table --- app/renderer/components/common/sortableTable.js | 3 ++- app/renderer/components/preferences/payment/ledgerTable.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/renderer/components/common/sortableTable.js b/app/renderer/components/common/sortableTable.js index ed6c0a3e2fc..a1afa10e61c 100644 --- a/app/renderer/components/common/sortableTable.js +++ b/app/renderer/components/common/sortableTable.js @@ -479,7 +479,8 @@ class SortableTable extends React.Component { [css(styles.table__th, this.props.smallRow && styles.table__th_smallRow)]: true } const isString = typeof heading === 'string' - const sortMethod = this.sortingDisabled ? 'none' : (dataType === 'number' ? 'number' : undefined) + const nonSortableColumns = this.props.nonSortableColumns ? this.props.nonSortableColumns : [] + const sortMethod = (this.sortingDisabled || nonSortableColumns.includes(heading)) ? 'none' : (dataType === 'number' ? 'number' : undefined) if (isString) headerClasses['heading-' + heading] = true return