Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Disables Action column header in ledger payments table #13076

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/renderer/components/common/sortableTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <th className={cx(headerClasses)}
Expand Down
1 change: 1 addition & 0 deletions app/renderer/components/preferences/payment/ledgerTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class LedgerTable extends ImmutableComponent {
fillAvailable
smallRow
headings={['', 'publisher', 'include', 'views', 'timeSpent', 'percentage', 'actions']}
nonSortableColumns={['actions']}
defaultHeading='percentage'
defaultHeadingSortOrder='desc'
headerStyles={styles.header}
Expand Down