You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using current version of react-boostrap-table2 i get an error when using the rowSelect function. Loading the datatable crashes and the following error is prompted:
node_modules\react-bootstrap-table-next\lib\src\row-selection\row-consumer.js
line 31,32,33 : _utils2.default.contains is not a function
Simply renaming .contains with .includes in row-consumer.js seems to work and removes the error.
To Reproduce
Steps to reproduce the behavior:
Use the following packages
"react-bootstrap-table-next": "^4.0.2",
"lodash": "^4.17.15",
"underscore": "^1.9.2",
"webpack": "4.41.0",
In webpack.config i have the following setup:
resolve: {
extensions: [ '.js', '.jsx' ],
modules: [
path.resolve('./js'),
path.resolve('./es6'),
],
alias: {
// Make backbone use lodash instead of underscore underscore: 'lodash/'
}
},
Create a datatable with prop:
selectRow={selectRow}
See error in your browser
row-consumer.js
line 31,32,33 : _utils2.default.contains is not a function
Edited..
I see that alot of other files uses .contains function also..
So not sure if there is a better fix?
Screenshots
The text was updated successfully, but these errors were encountered:
Error when using rowSelect with lodash 4.+
When using current version of react-boostrap-table2 i get an error when using the rowSelect function. Loading the datatable crashes and the following error is prompted:
node_modules\react-bootstrap-table-next\lib\src\row-selection\row-consumer.js
line 31,32,33 : _utils2.default.contains is not a function
As this post states, .contain has been swapped for .includes in lodash 4+
mgonto/restangular#1298 (comment)
Simply renaming .contains with .includes in row-consumer.js seems to work and removes the error.
To Reproduce
Steps to reproduce the behavior:
Use the following packages
"react-bootstrap-table-next": "^4.0.2",
"lodash": "^4.17.15",
"underscore": "^1.9.2",
"webpack": "4.41.0",
In webpack.config i have the following setup:
resolve: {
extensions: [ '.js', '.jsx' ],
modules: [
path.resolve('./js'),
path.resolve('./es6'),
],
alias: {
// Make backbone use lodash instead of underscore
underscore: 'lodash/'
}
},
Create a datatable with prop:
selectRow={selectRow}
See error in your browser
row-consumer.js
line 31,32,33 : _utils2.default.contains is not a function
Edited..
I see that alot of other files uses .contains function also..
So not sure if there is a better fix?
Screenshots

The text was updated successfully, but these errors were encountered: