From ff9cbe2885f655b24605324d19aa69d5f75c2c6a Mon Sep 17 00:00:00 2001 From: zeusakm Date: Sat, 18 Mar 2017 23:29:33 +0300 Subject: [PATCH] * #19. search, rowsSelector, pagination positioning + --- src/components/Tools.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Tools.js b/src/components/Tools.js index c10fe65..efe91f8 100644 --- a/src/components/Tools.js +++ b/src/components/Tools.js @@ -9,7 +9,6 @@ var EditorConstants = require('./EditorConstants'); var Lang = require('./Lang'); class Tools extends React.Component { - getPagesSelection() { const { @@ -42,7 +41,7 @@ class Tools extends React.Component { doSearch, lang } = this.props; - console.log(struct.search.indexOf(display)); + if (struct.search.indexOf(display) === -1) { return ''; } @@ -63,12 +62,14 @@ class Tools extends React.Component { updatePerPage, perPageRows, doSearch, - lang + lang, + tableOpts } = this.props; var language = Lang[lang]; let buttons = []; - this.props.tableOpts.buttons.map((btn, i) => { + if (typeof tableOpts.buttons !== CommonConstants.UNDEFINED) { + tableOpts.buttons.map((btn, i) => { if (btn[EditorConstants.EXTENDED] === EditorConstants.EDITOR_CREATE) { buttons[i] = ; } - }); + }); + } return (
{buttons}