handsontable 0.0.0-next-d4ae6d7-20221205 → 0.0.0-next-0c2e6f8-20221206
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +11 -5
- package/core.mjs +11 -5
- package/dataMap/dataMap.js +33 -65
- package/dataMap/dataMap.mjs +33 -65
- package/dataMap/metaManager/metaSchema.js +54 -38
- package/dataMap/metaManager/metaSchema.mjs +54 -38
- package/dataMap/replaceData.js +1 -2
- package/dataMap/replaceData.mjs +1 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +137 -133
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +7 -7
- package/dist/handsontable.js +137 -133
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editorManager.js +7 -4
- package/editorManager.mjs +7 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/columnSummary/columnSummary.js +5 -5
- package/plugins/columnSummary/columnSummary.mjs +5 -5
- package/plugins/columnSummary/endpoints.js +14 -2
- package/plugins/columnSummary/endpoints.mjs +14 -2
- package/plugins/formulas/formulas.js +6 -6
- package/plugins/formulas/formulas.mjs +6 -6
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
package/dataMap/dataMap.mjs
CHANGED
@@ -15,8 +15,8 @@ import "core-js/modules/es.number.constructor.js";
|
|
15
15
|
import "core-js/modules/es.array.splice.js";
|
16
16
|
import "core-js/modules/es.array.sort.js";
|
17
17
|
import "core-js/modules/es.array.slice.js";
|
18
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
19
18
|
import "core-js/modules/es.array.concat.js";
|
19
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
20
20
|
import "core-js/modules/es.array.filter.js";
|
21
21
|
import "core-js/modules/es.array.index-of.js";
|
22
22
|
import "core-js/modules/es.symbol.js";
|
@@ -68,9 +68,9 @@ var DataMap = /*#__PURE__*/function () {
|
|
68
68
|
/**
|
69
69
|
* @param {object} instance Instance of Handsontable.
|
70
70
|
* @param {Array} data Array of arrays or array of objects containing data.
|
71
|
-
* @param {
|
71
|
+
* @param {TableMeta} tableMeta The table meta instance.
|
72
72
|
*/
|
73
|
-
function DataMap(instance, data,
|
73
|
+
function DataMap(instance, data, tableMeta) {
|
74
74
|
_classCallCheck(this, DataMap);
|
75
75
|
/**
|
76
76
|
* Instance of {@link Handsontable}.
|
@@ -80,12 +80,12 @@ var DataMap = /*#__PURE__*/function () {
|
|
80
80
|
*/
|
81
81
|
this.instance = instance;
|
82
82
|
/**
|
83
|
-
* Instance of {@link
|
83
|
+
* Instance of {@link TableMeta}.
|
84
84
|
*
|
85
85
|
* @private
|
86
|
-
* @type {
|
86
|
+
* @type {TableMeta}
|
87
87
|
*/
|
88
|
-
this.
|
88
|
+
this.tableMeta = tableMeta;
|
89
89
|
/**
|
90
90
|
* Reference to the original dataset.
|
91
91
|
*
|
@@ -123,7 +123,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
123
123
|
if (typeof schema === 'undefined') {
|
124
124
|
throw new Error('trying to create `columns` definition but you didn\'t provide `schema` nor `data`');
|
125
125
|
}
|
126
|
-
var columns = this.
|
126
|
+
var columns = this.tableMeta.columns;
|
127
127
|
var i;
|
128
128
|
this.colToPropCache = [];
|
129
129
|
this.propToColCache = new Map();
|
@@ -136,7 +136,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
136
136
|
columnsLen = schemaLen > 0 ? schemaLen : this.countFirstRowKeys();
|
137
137
|
columnsAsFunc = true;
|
138
138
|
} else {
|
139
|
-
var maxCols = this.
|
139
|
+
var maxCols = this.tableMeta.maxCols;
|
140
140
|
columnsLen = Math.min(maxCols, columns.length);
|
141
141
|
}
|
142
142
|
for (i = 0; i < columnsLen; i++) {
|
@@ -258,7 +258,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
258
258
|
}, {
|
259
259
|
key: "getSchema",
|
260
260
|
value: function getSchema() {
|
261
|
-
var schema = this.
|
261
|
+
var schema = this.tableMeta.dataSchema;
|
262
262
|
if (schema) {
|
263
263
|
if (typeof schema === 'function') {
|
264
264
|
return schema();
|
@@ -320,17 +320,15 @@ var DataMap = /*#__PURE__*/function () {
|
|
320
320
|
}
|
321
321
|
var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);
|
322
322
|
if (continueProcess === false || physicalRowIndex === null) {
|
323
|
-
return
|
324
|
-
delta: 0
|
325
|
-
};
|
323
|
+
return 0;
|
326
324
|
}
|
327
|
-
var maxRows = this.
|
325
|
+
var maxRows = this.tableMeta.maxRows;
|
328
326
|
var columnCount = this.getSchema().length;
|
329
327
|
var rowsToAdd = [];
|
330
328
|
var _loop = function _loop() {
|
331
329
|
var row = null;
|
332
330
|
if (_this2.instance.dataType === 'array') {
|
333
|
-
if (_this2.
|
331
|
+
if (_this2.tableMeta.dataSchema) {
|
334
332
|
// Clone template array
|
335
333
|
row = deepClone(_this2.getSchema());
|
336
334
|
} else {
|
@@ -341,7 +339,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
341
339
|
});
|
342
340
|
}
|
343
341
|
} else if (_this2.instance.dataType === 'function') {
|
344
|
-
row = _this2.
|
342
|
+
row = _this2.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);
|
345
343
|
} else {
|
346
344
|
row = {};
|
347
345
|
deepExtend(row, _this2.getSchema());
|
@@ -364,14 +362,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
364
362
|
if (this.instance.countSourceRows() === rowsToAdd.length) {
|
365
363
|
this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount());
|
366
364
|
}
|
367
|
-
if (numberOfCreatedRows > 0) {
|
368
|
-
if (index === void 0 || index === null) {
|
369
|
-
// Creates the meta rows at the end of the rows collection.
|
370
|
-
this.metaManager.createRow(null, numberOfCreatedRows);
|
371
|
-
} else if (source !== 'auto') {
|
372
|
-
this.metaManager.createRow(physicalRowIndex, amount);
|
373
|
-
}
|
374
|
-
}
|
375
365
|
this.instance.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
|
376
366
|
this.instance.forceFullRender = true; // used when data was changed
|
377
367
|
|
@@ -405,7 +395,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
405
395
|
throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');
|
406
396
|
}
|
407
397
|
var dataSource = this.dataSource;
|
408
|
-
var maxCols = this.
|
398
|
+
var maxCols = this.tableMeta.maxCols;
|
409
399
|
var countSourceCols = this.instance.countSourceCols();
|
410
400
|
var columnIndex = index;
|
411
401
|
if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {
|
@@ -413,9 +403,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
413
403
|
}
|
414
404
|
var continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);
|
415
405
|
if (continueProcess === false) {
|
416
|
-
return
|
417
|
-
delta: 0
|
418
|
-
};
|
406
|
+
return 0;
|
419
407
|
}
|
420
408
|
var physicalColumnIndex = countSourceCols;
|
421
409
|
if (columnIndex < this.instance.countCols()) {
|
@@ -451,14 +439,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
451
439
|
nrOfColumns += 1;
|
452
440
|
}
|
453
441
|
this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
|
454
|
-
if (numberOfCreatedCols > 0) {
|
455
|
-
if (index === void 0 || index === null) {
|
456
|
-
// Creates the meta columns at the end of the columns collection.
|
457
|
-
this.metaManager.createColumn(null, numberOfCreatedCols);
|
458
|
-
} else if (source !== 'auto') {
|
459
|
-
this.metaManager.createColumn(startPhysicalIndex, amount);
|
460
|
-
}
|
461
|
-
}
|
462
442
|
var newVisualColumnIndex = this.instance.toVisualColumn(startPhysicalIndex);
|
463
443
|
this.instance.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
|
464
444
|
this.instance.forceFullRender = true; // used when data was changed
|
@@ -483,7 +463,6 @@ var DataMap = /*#__PURE__*/function () {
|
|
483
463
|
}, {
|
484
464
|
key: "removeRow",
|
485
465
|
value: function removeRow(index) {
|
486
|
-
var _this3 = this;
|
487
466
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
488
467
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
489
468
|
var rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.
|
@@ -504,19 +483,13 @@ var DataMap = /*#__PURE__*/function () {
|
|
504
483
|
// TODO: Function `removeRow` should validate fully, probably above.
|
505
484
|
if (rowIndex < this.instance.countRows()) {
|
506
485
|
this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
|
507
|
-
var customDefinedColumns = isDefined(this.
|
486
|
+
var customDefinedColumns = isDefined(this.tableMeta.columns) || isDefined(this.tableMeta.dataSchema);
|
508
487
|
|
509
488
|
// All rows have been removed. There shouldn't be any columns.
|
510
489
|
if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
|
511
490
|
this.instance.columnIndexMapper.setIndexesSequence([]);
|
512
491
|
}
|
513
492
|
}
|
514
|
-
var descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort(function (a, b) {
|
515
|
-
return b - a;
|
516
|
-
});
|
517
|
-
descendingPhysicalRows.forEach(function (rowPhysicalIndex) {
|
518
|
-
_this3.metaManager.removeRow(rowPhysicalIndex, 1);
|
519
|
-
});
|
520
493
|
this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
|
521
494
|
this.instance.forceFullRender = true; // used when data was changed
|
522
495
|
|
@@ -538,56 +511,51 @@ var DataMap = /*#__PURE__*/function () {
|
|
538
511
|
value: function removeCol(index) {
|
539
512
|
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
540
513
|
var source = arguments.length > 2 ? arguments[2] : undefined;
|
541
|
-
if (this.instance.dataType === 'object' || this.
|
514
|
+
if (this.instance.dataType === 'object' || this.tableMeta.columns) {
|
542
515
|
throw new Error('cannot remove column with object data source or columns option specified');
|
543
516
|
}
|
544
517
|
var columnIndex = typeof index !== 'number' ? -amount : index;
|
545
518
|
columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();
|
546
|
-
var
|
547
|
-
var
|
519
|
+
var logicColumns = this.visualColumnsToPhysical(columnIndex, amount);
|
520
|
+
var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) {
|
548
521
|
return b - a;
|
549
522
|
});
|
550
|
-
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount,
|
523
|
+
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, logicColumns, source);
|
551
524
|
if (actionWasNotCancelled === false) {
|
552
525
|
return false;
|
553
526
|
}
|
554
527
|
var isTableUniform = true;
|
555
|
-
var removedColumnsCount =
|
528
|
+
var removedColumnsCount = descendingLogicColumns.length;
|
556
529
|
var data = this.dataSource;
|
557
530
|
for (var c = 0; c < removedColumnsCount; c++) {
|
558
|
-
if (isTableUniform &&
|
531
|
+
if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {
|
559
532
|
isTableUniform = false;
|
560
533
|
}
|
561
534
|
}
|
562
535
|
if (isTableUniform) {
|
563
536
|
for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
|
564
|
-
data[r].splice(
|
565
|
-
if (r === 0) {
|
566
|
-
this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);
|
567
|
-
}
|
537
|
+
data[r].splice(logicColumns[0], amount);
|
568
538
|
}
|
569
539
|
} else {
|
570
540
|
for (var _r = 0, _rlen = this.instance.countSourceRows(); _r < _rlen; _r++) {
|
571
541
|
for (var _c = 0; _c < removedColumnsCount; _c++) {
|
572
|
-
data[_r].splice(
|
573
|
-
if (_r === 0) {
|
574
|
-
this.metaManager.removeColumn(descendingPhysicalColumns[_c], 1);
|
575
|
-
}
|
542
|
+
data[_r].splice(descendingLogicColumns[_c], 1);
|
576
543
|
}
|
577
544
|
}
|
578
545
|
}
|
579
546
|
|
580
547
|
// TODO: Function `removeCol` should validate fully, probably above.
|
581
548
|
if (columnIndex < this.instance.countCols()) {
|
582
|
-
this.instance.columnIndexMapper.removeIndexes(
|
549
|
+
this.instance.columnIndexMapper.removeIndexes(logicColumns);
|
583
550
|
|
584
551
|
// All columns have been removed. There shouldn't be any rows.
|
585
552
|
if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
|
586
553
|
this.instance.rowIndexMapper.setIndexesSequence([]);
|
587
554
|
}
|
588
555
|
}
|
589
|
-
this.instance.runHooks('afterRemoveCol', columnIndex, amount,
|
556
|
+
this.instance.runHooks('afterRemoveCol', columnIndex, amount, logicColumns, source);
|
590
557
|
this.instance.forceFullRender = true; // used when data was changed
|
558
|
+
|
591
559
|
this.refreshDuckSchema();
|
592
560
|
return true;
|
593
561
|
}
|
@@ -659,7 +627,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
659
627
|
}, {
|
660
628
|
key: "spliceData",
|
661
629
|
value: function spliceData(index, deleteCount, elements) {
|
662
|
-
var
|
630
|
+
var _this3 = this;
|
663
631
|
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
|
664
632
|
if (continueSplicing !== false) {
|
665
633
|
var newData = [].concat(_toConsumableArray(this.dataSource.slice(0, index)), _toConsumableArray(elements), _toConsumableArray(this.dataSource.slice(index)));
|
@@ -670,7 +638,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
670
638
|
// Pushing to array instead of using `splice`, because Babel changes the code to one that uses the `apply` method.
|
671
639
|
// The used method was cause of the problem described within #7840.
|
672
640
|
newData.forEach(function (row) {
|
673
|
-
return
|
641
|
+
return _this3.dataSource.push(row);
|
674
642
|
});
|
675
643
|
}
|
676
644
|
}
|
@@ -879,7 +847,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
879
847
|
}, {
|
880
848
|
key: "getLength",
|
881
849
|
value: function getLength() {
|
882
|
-
var maxRowsFromSettings = this.
|
850
|
+
var maxRowsFromSettings = this.tableMeta.maxRows;
|
883
851
|
var maxRows;
|
884
852
|
if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {
|
885
853
|
maxRows = 0;
|
@@ -938,8 +906,8 @@ var DataMap = /*#__PURE__*/function () {
|
|
938
906
|
var r;
|
939
907
|
var c;
|
940
908
|
var row;
|
941
|
-
var maxRows = this.
|
942
|
-
var maxCols = this.
|
909
|
+
var maxRows = this.tableMeta.maxRows;
|
910
|
+
var maxCols = this.tableMeta.maxCols;
|
943
911
|
if (maxRows === 0 || maxCols === 0) {
|
944
912
|
return [];
|
945
913
|
}
|
@@ -996,7 +964,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
996
964
|
key: "destroy",
|
997
965
|
value: function destroy() {
|
998
966
|
this.instance = null;
|
999
|
-
this.
|
967
|
+
this.tableMeta = null;
|
1000
968
|
this.dataSource = null;
|
1001
969
|
this.duckSchema = null;
|
1002
970
|
this.colToPropCache.length = 0;
|
@@ -63,7 +63,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
63
63
|
* ::: only-for react
|
64
64
|
*
|
65
65
|
* To apply configuration options, pass them as individual props
|
66
|
-
* of the [`HotTable`](@/guides/getting-started/installation.md
|
66
|
+
* of the [`HotTable`](@/guides/getting-started/installation.md#use-the-hottable-component)
|
67
67
|
* or [`HotColumn`](@/guides/columns/react-hot-column.md) components.
|
68
68
|
*
|
69
69
|
* Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.
|
@@ -93,10 +93,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
93
93
|
* :::
|
94
94
|
*
|
95
95
|
* Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
|
96
|
-
* - [The entire grid](@/guides/getting-started/configuration-options.md#
|
97
|
-
* - [Individual columns](@/guides/getting-started/configuration-options.md#
|
98
|
-
* - [Individual rows](@/guides/getting-started/configuration-options.md#
|
99
|
-
* - [Individual cells](@/guides/getting-started/configuration-options.md#
|
96
|
+
* - [The entire grid](@/guides/getting-started/configuration-options.md#set-grid-options)
|
97
|
+
* - [Individual columns](@/guides/getting-started/configuration-options.md#set-column-options)
|
98
|
+
* - [Individual rows](@/guides/getting-started/configuration-options.md#set-row-options)
|
99
|
+
* - [Individual cells](@/guides/getting-started/configuration-options.md#set-cell-options)
|
100
100
|
* - [Individual grid elements, based on any logic you implement](@/guides/getting-started/configuration-options.md#implementing-custom-logic)
|
101
101
|
*
|
102
102
|
* Read more:
|
@@ -417,14 +417,16 @@ var _default = function _default() {
|
|
417
417
|
*/
|
418
418
|
autoRowSize: void 0,
|
419
419
|
/**
|
420
|
-
*
|
420
|
+
* With [`autoWrapCol`](#autowrapcol) enabled:
|
421
|
+
* - When you select a bottom-most cell, pressing <kbd>**↓**</kbd> takes you to the top-most cell of the next column.
|
422
|
+
* - When you select a top-most cell, pressing <kbd>**↑**</kbd> takes you to the bottom-most cell of the previous column.
|
421
423
|
*
|
422
|
-
* You can set the `autoWrapCol` option to one of the following:
|
424
|
+
* You can set the [`autoWrapCol`](#autowrapcol) option to one of the following:
|
423
425
|
*
|
424
|
-
* | Setting | Description
|
425
|
-
* | ----------------- |
|
426
|
-
* | `true` |
|
427
|
-
* | `false` (default) |
|
426
|
+
* | Setting | Description |
|
427
|
+
* | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
428
|
+
* | `true` | When you select a bottom-most cell, pressing <kbd>**↓**</kbd> takes you to the top-most cell of the next column.<br><br>When you select a top-most cell, pressing <kbd>**↑**</kbd> takes you to the bottom-most cell of the previous column. |
|
429
|
+
* | `false` (default) | When you select a bottom-most cell, pressing <kbd>**↓**</kbd> doesn't do anything.<br><br>When you select a top-most cell, pressing <kbd>**↑**</kbd> doesn't do anything. |
|
428
430
|
*
|
429
431
|
* @memberof Options#
|
430
432
|
* @type {boolean}
|
@@ -433,20 +435,29 @@ var _default = function _default() {
|
|
433
435
|
*
|
434
436
|
* @example
|
435
437
|
* ```js
|
436
|
-
* //
|
438
|
+
* // when you select a bottom-most cell, pressing ⬇ doesn't do anything
|
439
|
+
* // when you select a top-most cell, pressing ⬆ doesn't do anything
|
440
|
+
* autoWrapCol: false, // default setting
|
441
|
+
*
|
442
|
+
* // when you select a bottom-most cell, pressing ⬇ takes you to the top-most cell of the next column
|
443
|
+
* // when you select a top-most cell, pressing ⬆ takes you to the bottom-most cell of the previous column
|
437
444
|
* autoWrapCol: true,
|
438
445
|
* ```
|
439
446
|
*/
|
440
447
|
autoWrapCol: false,
|
441
448
|
/**
|
442
|
-
*
|
449
|
+
* With [`autoWrapRow`](#autoWrapRow) enabled:
|
450
|
+
* - When you select the first cell of a row, pressing <kbd>**←**</kbd>* takes you to the last cell of the row above.
|
451
|
+
* - When you select the last cell of a row, pressing <kbd>**→**</kbd>* takes you to the first cell of the row below.
|
452
|
+
*
|
453
|
+
* You can set the [`autoWrapRow`](#autoWrapRow) option to one of the following:
|
443
454
|
*
|
444
|
-
*
|
455
|
+
* | Setting | Description |
|
456
|
+
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
457
|
+
* | `true` | When you select the first cell of a row, pressing <kbd>**←**</kbd>* takes you to the last cell of the row above.<br><br>When you select the last cell of a row, pressing <kbd>**→**</kbd>* takes you to the first cell of the row below. |
|
458
|
+
* | `false` (default) | When you select the first cell of a row, pressing <kbd>**←**</kbd>* doesn't do anything.<br><br>When you select the last cell of a row, pressing <kbd>**→**</kbd>* doesn't do anything. |
|
445
459
|
*
|
446
|
-
*
|
447
|
-
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
448
|
-
* | `true` | On reaching the grid's left or right edge:<br>- Jump to the grid's opposite edge<br>- Select a cell in the previous/next row |
|
449
|
-
* | `false` (default) | On reaching the grid's left or right edge, stop |
|
460
|
+
* \* The exact key depends on your [`layoutDirection`](#layoutdirection) configuration.
|
450
461
|
*
|
451
462
|
* @memberof Options#
|
452
463
|
* @type {boolean}
|
@@ -455,7 +466,12 @@ var _default = function _default() {
|
|
455
466
|
*
|
456
467
|
* @example
|
457
468
|
* ```js
|
458
|
-
* //
|
469
|
+
* // when you select the first cell of a row, pressing ⬅ doesn't do anything
|
470
|
+
* // when you select the last cell of a row, pressing ➡️ doesn't do anything
|
471
|
+
* autoWrapRow: false, // default setting
|
472
|
+
*
|
473
|
+
* // when you select the first cell of a row, pressing ⬅ takes you to the last cell of the row above
|
474
|
+
* // when you select the last cell of a row, pressing ➡️ takes you to the first cell of the row below
|
459
475
|
* autoWrapRow: true,
|
460
476
|
* ```
|
461
477
|
*/
|
@@ -489,11 +505,11 @@ var _default = function _default() {
|
|
489
505
|
/**
|
490
506
|
* The `cell` option lets you apply [configuration options](@/guides/getting-started/configuration-options.md) to individual cells.
|
491
507
|
*
|
492
|
-
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
508
|
+
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options),
|
493
509
|
* and the [`columns`](#columns) options.
|
494
510
|
*
|
495
511
|
* Read more:
|
496
|
-
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#
|
512
|
+
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#set-cell-options)
|
497
513
|
* - [`columns`](#columns)
|
498
514
|
*
|
499
515
|
* @memberof Options#
|
@@ -530,8 +546,8 @@ var _default = function _default() {
|
|
530
546
|
* | `prop` | No | String \| Number | If [`data`](#data) is set to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), `prop` is the same number as `column`.<br><br>If [`data`](#data) is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), `prop` is a property name for the column's data object. |
|
531
547
|
*
|
532
548
|
* Read more:
|
533
|
-
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#
|
534
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
549
|
+
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#implement-custom-logic)
|
550
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
535
551
|
* - [`columns`](#columns)
|
536
552
|
* - [`cell`](#cell)
|
537
553
|
*
|
@@ -748,12 +764,12 @@ var _default = function _default() {
|
|
748
764
|
* - An array of objects (each object represents one column)
|
749
765
|
* - A function that returns an array of objects
|
750
766
|
*
|
751
|
-
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#
|
767
|
+
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#set-grid-options).
|
752
768
|
*
|
753
769
|
* When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.
|
754
770
|
*
|
755
771
|
* Read more:
|
756
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
772
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
757
773
|
* - [`startCols`](#startCols)
|
758
774
|
* - [`minCols`](#minCols)
|
759
775
|
* - [`maxCols`](#maxCols)
|
@@ -886,12 +902,12 @@ var _default = function _default() {
|
|
886
902
|
* | `type` | `'sum'` \| `'min'` \| `'max'` \| `'count'` \| `'average'` \| `'custom'` | [Summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
887
903
|
* | `destinationRow` | A number | [Destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
888
904
|
* | `destinationColumn` | A number | [Destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
889
|
-
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#
|
905
|
+
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#force-numeric-values) |
|
890
906
|
* | `reversedRowCoords` | `true` \| `false` | [Reverse row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
891
|
-
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#
|
907
|
+
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#throw-data-type-errors) |
|
892
908
|
* | `readOnly` | `true` \| `false` | Make summary cell read-only |
|
893
|
-
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#
|
894
|
-
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#
|
909
|
+
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#round-a-column-summary-result) |
|
910
|
+
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#implement-a-custom-summary-function) |
|
895
911
|
*
|
896
912
|
* Read more:
|
897
913
|
* - [Column summary](@/guides/columns/column-summary.md)
|
@@ -1069,13 +1085,13 @@ var _default = function _default() {
|
|
1069
1085
|
* | `false` | Disable the [`ContextMenu`](@/api/contextMenu.md) plugin |
|
1070
1086
|
* | `true` | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |
|
1071
1087
|
* | An array | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |
|
1072
|
-
* | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration) |
|
1088
|
+
* | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration) |
|
1073
1089
|
*
|
1074
1090
|
* Read more:
|
1075
1091
|
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
1076
1092
|
* - [Context menu: Context menu with default options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options)
|
1077
1093
|
* - [Context menu: Context menu with specific options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options)
|
1078
|
-
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration)
|
1094
|
+
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-a-fully-custom-configuration)
|
1079
1095
|
* - [Plugins: `ContextMenu`](@/api/contextMenu.md)
|
1080
1096
|
*
|
1081
1097
|
* @memberof Options#
|
@@ -2572,7 +2588,7 @@ var _default = function _default() {
|
|
2572
2588
|
*
|
2573
2589
|
* You can set the layout direction only at Handsontable's [initialization](@/guides/getting-started/installation.md#initialize-handsontable). Any change of the `layoutDirection` option after the initialization (e.g. using the [`updateSettings()`](@/api/core.md#updatesettings) method) is ignored.
|
2574
2590
|
*
|
2575
|
-
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#
|
2591
|
+
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#set-grid-options).
|
2576
2592
|
* You can't set it for individual columns, rows, or cells.
|
2577
2593
|
*
|
2578
2594
|
* You can set the `layoutDirection` option to one of the following strings:
|
@@ -2644,8 +2660,8 @@ var _default = function _default() {
|
|
2644
2660
|
* The `locale` option configures Handsontable's [locale](@/guides/internationalization/locale.md) settings.
|
2645
2661
|
*
|
2646
2662
|
* You can set the `locale` option to any valid and canonicalized Unicode BCP 47 locale tag,
|
2647
|
-
* both for the [entire grid](@/guides/internationalization/locale.md#
|
2648
|
-
* and for [individual columns](@/guides/internationalization/locale.md#
|
2663
|
+
* both for the [entire grid](@/guides/internationalization/locale.md#set-the-grid-s-locale),
|
2664
|
+
* and for [individual columns](@/guides/internationalization/locale.md#set-a-column-s-locale).
|
2649
2665
|
*
|
2650
2666
|
* Read more:
|
2651
2667
|
* - [Locale](@/guides/internationalization/locale.md)
|
@@ -3298,7 +3314,7 @@ var _default = function _default() {
|
|
3298
3314
|
* | `true` | Enable the [`PersistentState`](@/api/persistentState.md) plugin |
|
3299
3315
|
*
|
3300
3316
|
* Read more:
|
3301
|
-
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#
|
3317
|
+
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#save-data-locally)
|
3302
3318
|
* - [Plugins: `PersistentState`](@/api/persistentState.md)
|
3303
3319
|
*
|
3304
3320
|
* @memberof Options#
|
@@ -3741,7 +3757,7 @@ var _default = function _default() {
|
|
3741
3757
|
* | `'multiple'` | Allow the user to select multiple ranges of cells at a time. |
|
3742
3758
|
*
|
3743
3759
|
* Read more:
|
3744
|
-
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#
|
3760
|
+
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#select-ranges)
|
3745
3761
|
*
|
3746
3762
|
* @memberof Options#
|
3747
3763
|
* @type {string}
|
@@ -3832,7 +3848,7 @@ var _default = function _default() {
|
|
3832
3848
|
* | `true` | - Disable pasting data into this column<br>- On pasting, paste data into the next column to the right |
|
3833
3849
|
*
|
3834
3850
|
* Read more:
|
3835
|
-
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#
|
3851
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#set-column-options)
|
3836
3852
|
*
|
3837
3853
|
* @memberof Options#
|
3838
3854
|
* @type {boolean}
|
@@ -3865,7 +3881,7 @@ var _default = function _default() {
|
|
3865
3881
|
* | `true` | - Disable pasting data into this row<br>- On pasting, paste data into the row below |
|
3866
3882
|
*
|
3867
3883
|
* Read more:
|
3868
|
-
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#
|
3884
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#set-row-options)
|
3869
3885
|
*
|
3870
3886
|
* @memberof Options#
|
3871
3887
|
* @type {boolean}
|