Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-bootstrap-table-next

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-table-next - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

46

lib/src/contexts/selection-context.js

@@ -64,20 +64,21 @@ 'use strict';

if (mode === ROW_SELECT_SINGLE) {
// when select mode is radio
currSelected = [rowKey];
} else if (checked) {
// when select mode is checkbox
currSelected.push(rowKey);
} else {
currSelected = currSelected.filter(function (value) {
return value !== rowKey;
});
}
if (onSelect) {
var row = _operators2.default.getRowByRowId(data, keyField, rowKey);
onSelect(row, checked, rowIndex, e);
}
_this.setState(function () {
var result = true;
if (onSelect) {
var row = _operators2.default.getRowByRowId(data, keyField, rowKey);
result = onSelect(row, checked, rowIndex, e);
}
if (result === true || result === undefined) {
if (mode === ROW_SELECT_SINGLE) {
// when select mode is radio
currSelected = [rowKey];
} else if (checked) {
// when select mode is checkbox
currSelected.push(rowKey);
} else {
currSelected = currSelected.filter(function (value) {
return value !== rowKey;
});
}
}
return { selected: currSelected };

@@ -109,7 +110,10 @@ });

if (onSelectAll) {
onSelectAll(!isUnSelect, _operators2.default.getSelectedRows(data, keyField, isUnSelect ? _this.state.selected : currSelected), e);
}
_this.setState(function () {
var result = void 0;
if (onSelectAll) {
result = onSelectAll(!isUnSelect, _operators2.default.getSelectedRows(data, keyField, isUnSelect ? _this.state.selected : currSelected), e);
if (Array.isArray(result)) {
currSelected = result;
}
}
return { selected: currSelected };

@@ -116,0 +120,0 @@ });

{
"name": "react-bootstrap-table-next",
"version": "1.3.1",
"version": "1.4.0",
"description": "Next generation of react-bootstrap-table",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc