MCPcopy
hub / github.com/nadbm/react-datasheet / updateLocation

Function updateLocation

lib/DataSheet.js:459–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

457 var newLocation = { i: start.i + offsets.i, j: start.j + offsets.j };
458
459 var updateLocation = function updateLocation() {
460 if (data[newLocation.i] && typeof data[newLocation.i][newLocation.j] !== 'undefined') {
461 _this3._setState({
462 start: e.shiftKey && !jumpRow ? oldStartLocation : newLocation,
463 end: e.shiftKey && !jumpRow ? newEndLocation : newLocation,
464 editing: {}
465 });
466 e.preventDefault();
467 return true;
468 }
469 return false;
470 };
471 if (!updateLocation() && jumpRow) {
472 if (offsets.j < 0) {
473 newLocation = { i: start.i - 1, j: data[0].length - 1 };

Callers 1

DataSheet.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected