react-sheet
Advanced tools
Comparing version 0.0.56 to 0.0.57
@@ -15,2 +15,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function detectPlatform() { | ||
if (navigator.platform.indexOf('Mac') > -1) { | ||
return 'mac'; | ||
} else if (navigator.platform.indexOf('Win') > -1) { | ||
return 'win'; | ||
} else { | ||
return 'others'; | ||
} | ||
} | ||
// TODO: REFACTOR THIS! | ||
@@ -115,5 +124,3 @@ function renderRow(data, columns, selection, focusedCell, setSelection, focus, onEnter, setSelectionEnd, selectionEnd, onMouseUp, onMouseDown, onMouseOver, setDragCopyValue, isSelecting, addRow, addedData) { | ||
AutoSizer, | ||
{ onResize: function onResize() { | ||
console.log('resized'); | ||
} }, | ||
null, | ||
function (_ref3) { | ||
@@ -123,3 +130,3 @@ var width = _ref3.width, | ||
return React.createElement(List, { | ||
width: width, | ||
width: detectPlatform() == 'mac' ? width : width - 15, | ||
height: height, | ||
@@ -126,0 +133,0 @@ rowCount: data.length, |
@@ -31,2 +31,11 @@ 'use strict'; | ||
function detectPlatform() { | ||
if (navigator.platform.indexOf('Mac') > -1) { | ||
return 'mac'; | ||
} else if (navigator.platform.indexOf('Win') > -1) { | ||
return 'win'; | ||
} else { | ||
return 'others'; | ||
} | ||
} | ||
// TODO: REFACTOR THIS! | ||
@@ -131,5 +140,3 @@ function renderRow(data, columns, selection, focusedCell, setSelection, focus, onEnter, setSelectionEnd, selectionEnd, onMouseUp, onMouseDown, onMouseOver, setDragCopyValue, isSelecting, addRow, addedData) { | ||
_AutoSizer2.default, | ||
{ onResize: function onResize() { | ||
console.log('resized'); | ||
} }, | ||
null, | ||
function (_ref3) { | ||
@@ -139,3 +146,3 @@ var width = _ref3.width, | ||
return _react2.default.createElement(_reactVirtualized.List, { | ||
width: width, | ||
width: detectPlatform() == 'mac' ? width : width - 15, | ||
height: height, | ||
@@ -142,0 +149,0 @@ rowCount: data.length, |
{ | ||
"name": "react-sheet", | ||
"version": "0.0.56", | ||
"version": "0.0.57", | ||
"description": "Spreadsheet component for react", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3873693
46948