Skip to content

Commit

Permalink
fix #1213
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed May 11, 2017
1 parent 7e98f0d commit 28b3ea3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
9 changes: 6 additions & 3 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,8 @@ class BootstrapTable extends Component {
btnGroup={ this.props.options.btnGroup }
toolBar={ this.props.options.toolBar }
reset={ this.state.reset }
isValidKey={ this.store.isValidKey } />
isValidKey={ this.store.isValidKey }
insertFailIndicator={ this.props.options.insertFailIndicator || Const.INSERT_FAIL_INDICATOR } />
</div>
);
} else {
Expand Down Expand Up @@ -1448,7 +1449,8 @@ BootstrapTable.propTypes = {
expanding: PropTypes.array,
onlyOneExpanding: PropTypes.bool,
beforeShowError: PropTypes.func,
printToolBar: PropTypes.bool
printToolBar: PropTypes.bool,
insertFailIndicator: PropTypes.string
}),
fetchInfo: PropTypes.shape({
dataTotalSize: PropTypes.number
Expand Down Expand Up @@ -1595,7 +1597,8 @@ BootstrapTable.defaultProps = {
expanding: [],
onlyOneExpanding: false,
beforeShowError: undefined,
printToolBar: true
printToolBar: true,
insertFailIndicator: Const.INSERT_FAIL_INDICATOR
},
fetchInfo: {
dataTotalSize: 0
Expand Down
3 changes: 2 additions & 1 deletion src/Const.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const CONST_VAR = {
REMOTE_DROP_ROW: 'dropRow',
REMOTE_FILTER: 'filter',
REMOTE_SEARCH: 'search',
REMOTE_EXPORT_CSV: 'exportCSV'
REMOTE_EXPORT_CSV: 'exportCSV',
INSERT_FAIL_INDICATOR: 'Form validate errors, please checking!'
};

CONST_VAR.REMOTE = {};
Expand Down
8 changes: 3 additions & 5 deletions src/toolbar/ToolBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ class ToolBar extends Component {
}

displayCommonMessage = () => {
notice(
'error',
'Form validate errors, please checking!',
'');
notice('error', this.props.insertFailIndicator, '');
}

validateNewRow(newRow) {
Expand Down Expand Up @@ -480,7 +477,8 @@ ToolBar.propTypes = {
toolBar: PropTypes.func,
searchPosition: PropTypes.string,
reset: PropTypes.bool,
isValidKey: PropTypes.func
isValidKey: PropTypes.func,
insertFailIndicator: PropTypes.string
};

ToolBar.defaultProps = {
Expand Down

0 comments on commit 28b3ea3

Please sign in to comment.