diff --git a/app/renderer/components/common/sortableTable.js b/app/renderer/components/common/sortableTable.js index 6a40605c320..18200117af8 100644 --- a/app/renderer/components/common/sortableTable.js +++ b/app/renderer/components/common/sortableTable.js @@ -6,6 +6,8 @@ const React = require('react') const Immutable = require('immutable') const tableSort = require('tablesort') +const {StyleSheet, css} = require('aphrodite/no-important') + // Utils const cx = require('../../../../js/lib/classSet') const eventUtil = require('../../../../js/lib/eventUtil') @@ -418,16 +420,19 @@ class SortableTable extends React.Component { return {this.generateTableRows(this.props.rows)} } } + render () { if (!this.props.headings || !this.props.rows) { return false } + return { this.table = node }}> @@ -469,4 +474,20 @@ class SortableTable extends React.Component { } } +const styles = StyleSheet.create({ + // By default the width and margin are not specified. + // It can be specified by setting css to tableClassNames. + // See 'styles.devices__devicesList' on syncTab.js for example. + table: { + boxSizing: 'border-box', + cursor: 'default', + borderSpacing: 0 + }, + + // Setting 'fillAvailable' maximizes the width of the table. + table_fillAvailable: { + width: '-webkit-fill-available' + } +}) + module.exports = SortableTable diff --git a/app/renderer/components/preferences/extensionsTab.js b/app/renderer/components/preferences/extensionsTab.js index b097d2fa31f..bc556b0bc0f 100644 --- a/app/renderer/components/preferences/extensionsTab.js +++ b/app/renderer/components/preferences/extensionsTab.js @@ -56,7 +56,7 @@ class ExtensionsTab extends ImmutableComponent { return [ { // Icon - html: + html: }, { // Name html: css(styles.table__row)).toJS() + this.props.extensions.map(entry => css(styles.tableRow)).toJS() } rows={this.props.extensions.map(entry => this.getRow(entry))} />