Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkushman committed Mar 27, 2017
2 parents 442f2f1 + fa0fca1 commit 39e193d
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ see how to create table with JSX bellow.
## Few screen-shots

### Multiple select with Ctrl and Shift
![alt tag](https://raw.githubusercontent.com/GigaTables/gigatables/master/GigaTables_basic_view.png)
![alt tag](https://raw.githubusercontent.com/GigaTables/reactables/master/screens/GigaTables_basic_view.png)

### CRUD pop-ups
![alt tag](https://raw.githubusercontent.com/GigaTables/gigatables/master/GigaTables_edit_item.png)
![alt tag](https://raw.githubusercontent.com/GigaTables/reactables/master/screens/GigaTables_edit_item.png)

### Pagination + sorting
![alt tag](https://raw.githubusercontent.com/GigaTables/reactables/master/screens/GigaTables_pagination_with_sort.png)

### Delete items
![alt tag](https://raw.githubusercontent.com/GigaTables/reactables/master/screens/GigaTables_delete_items.png)

## Installation based on browser script implementation (which U can download from build/ dir)
```HTML
Expand Down
Binary file added screens/GigaTables_basic_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/GigaTables_create_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/GigaTables_delete_items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/GigaTables_edit_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/GigaTables_pagination_with_sort.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/.DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ class Header extends React.Component {
this.isDiscreteSearch = false;
}

shouldComponentUpdate(nextProps)
{
return this.props.sortId !== nextProps.sortId
|| this.props.columns[this.props.sortId] !== nextProps.columns[this.props.sortId]
|| this.props.sortDirection !== nextProps.sortDirection;
}

getHeaderContent()
{
const {
Expand Down
8 changes: 8 additions & 0 deletions src/components/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ var EditorConstants = require('./EditorConstants');
var Lang = require('./Lang');

class Pagination extends React.Component {
shouldComponentUpdate(nextProps)
{
return this.props.countRows !== nextProps.countRows
|| this.props.page !== nextProps.page
|| this.props.perPage !== nextProps.perPage
|| this.props.fromRow !== nextProps.fromRow;
}

render()
{
var lang = Lang[this.props.lang];
Expand Down
11 changes: 11 additions & 0 deletions src/components/Row.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ import styles from '../css/styles.css'
import classNames from 'classnames/bind'

export default class Row extends React.Component {
shouldComponentUpdate(nextProps) {
const { gteRowId, count, selectedRows, minRow, maxRow } = this.props;
return gteRowId !== nextProps.gteRowId
|| count !== nextProps.count
|| selectedRows.length !== nextProps.selectedRows.length
|| selectedRows.indexOf(count) !== nextProps.selectedRows.indexOf(count) // on multiple merged rows selection Shift+Clk
|| selectedRows.indexOf(count) !== -1 // on multiple splited rows selection Ctrl+Clk
|| minRow !== nextProps.minRow
|| maxRow !== nextProps.maxRow;
}

render()
{
const {
Expand Down

0 comments on commit 39e193d

Please sign in to comment.