We are excited to announce we have just released the second beta version of 8.0.0. This blog post describes changes that happened after the release of the first beta, for the previous changes please see the previous blog post.
After implementing a new architecture for managing row and column indexes several parts of the library had te be adapted. It mainly includes adjusting the existing hooks to work properly with the new solution for managing the indexes. This is the last step before releasing a stable 8.0.0 version.
Major changes
We adapted the library to work with the new architecture for row and column management.
Breaking changes
- Changes related to the refactor of
HiddenColumns
andCollapsibleColumns
. They will be compatible with upcomingIndexMappers
#6547 along with other adjustments #6178:- Hidden indexes will no longer be rendered, as a consequence
afterRenderer
,modifyColWidth
,beforeStretchingColumnWidth
will be executable only on visible (meaning, rendered) rows and columns. - The
getColWidth
for hidden index will return 0 - it used to return 0.1. Also, it will no longer be called internally, the need can be now achieved by managers of rows and columns. - The
modifyColWidth
hook will not be called internally. However, it will be executed when the user will call thegetColWidth
. - Hidden indexes aren't rendered. As a consequence hooks
beforeValueRender
,beforeRenderer
,afterRenderer
,modifyColWidth
,beforeStretchingColumnWidth
etc. will be executed just for some of the columns (just the rendered ones). listen
function from the core API used to acceptmodifyDocumentFocus
as optional parameter, this parameter was removed.CustomBorders
plugin was adapted to work withHiddenColumns
properly, from now on hiding cells at the start or at the end of a range will also hide their borders. Also, hiding a single cell with borders will hide all of its borders. #7083.CollapsibleColumns
will no longer useHiddenColumns
plugin to work. #6204- Refactored
HiddenColumns
to be compatible with upcomingIndexMappers
. #6179 - Renamed the following methods of the
IndexMapper
:- from
getPhysicalIndex
togetPhysicalFromVisualIndex
- from
getVisualIndex
togetVisualFromPhysicalIndex
- from
isSkipped
toisTrimmed
- from
getNotSkippedIndexes
togetNotTrimmedIndexes
- from
getNotSkippedIndexesLength
togetNotTrimmedIndexesLength
- from
SkipMap
toTrimmingMap
- from
VisualIndexToPhysicalIndexMap
toIndexesSequence
.
- from
hiddenRow
andhiddenColumn
hooks were removed. They were used to check if a given index is hidden in theHiddenColumns
andHiddenRows
plugins. Since now there may be more sources of hiding indexes they have been replaced byIndexMapper
with the newisHidden
method. It keeps the broad information about hidden indexes and their sources.rowOffset
andcolOffset
were removed since they aliased the methods from Walkontable #6547
- Hidden indexes will no longer be rendered, as a consequence
- Changes related to adjusting
HiddenRows
to newIndexMapper
architecture #6177:- Adjusted
HiddenRows
to newIndexMapper
architecture. - Refactored the
HiddenRows
plugin. #6887
- Adjusted
- Selection behavior changed when hiding cells from the
ContextMenu
, now it is selecting a column on the right when there is space on right to the last selected column, selecting a column on the left otherwise. #6949 - Developed a unified way to identify HOT "input" elements. All input elements owned by HOT got an attribute "data-hot-input" which are identified by that key. #6383.
NestedHeaders
plugin was rewritten, from now on, only a tree-like structure will be allowed, meaning, there will be no possibility to place nested headers in-between layers #6716.- Added
modifySourceData
hook andsetSourceDataAtRowProp
,setSourceDataAtCell
methods. #6664 - The right mouse button (RMB) click on the corner when there is no data will show all options disabled. This has two exceptions though: Insert column right and Insert row below when a table has data type defined by dataSchema as array, except Insert row right otherwise.
- Left mouse button (LMB) click on the top left corner will now select all cells along with their headers.
- Removed the experimental
GanttChart
plugin #7022
Depraciations
HeaderTooltips
plugin becomes deprecated and will be removed in the next major version. #7023- Internet Explorer support is deprecated and will be removed by the end of the year #7026
Changelog
Added
- Added
modifySourceData
hook andsetSourceDataAtRowProp
,setSourceDataAtCell
methods. #6664. - Added an extra type of index map has been introduced. It's
HidingMap
. It works similar to theTrimmingMap
. #6547 - Added new methods to the IndexMapper class #6547:
getPhysicalFromRenderableIndex: (renderableIndex: number) => number | null,
getVisualFromRenderableIndex: (renderableIndex: number) => number | null,
getRenderableFromVisualIndex: (visualIndex: number) => number | null,
isHidden: (physicalIndex: number) => boolean,
getFirstNotHiddenIndex: (fromVisualIndex: number, incrementBy: number, searchAlsoOtherWayAround?: boolean, indexForNextSearch?: number) => number | null,
getNotHiddenIndexes: (readFromCache?: boolean) => number[],
getNotHiddenIndexesLength: () => number,
getRenderableIndexes: (readFromCache?: boolean) => number[],
getRenderableIndexesLength: () => number
.
- Added new argument to
scrollViewportTo
method: optionalconsiderHiddenIndexes
which is aboolean
. #6547 - Added additional information available in the cell meta object - the language. #6254.
- Added a possibility to allow cancelling of
autofill
in thebeforeAutofill
hook #4441 - Added support for newer versions of moment, numbro and pikaday. #5159
- Added
afterAutoFill
hook. #6135 - Added z-index to
fixedRowsBottom
. #6269 - Added deprecated warning messages mechanism for plugin hooks. #6613
- Added a missing argument in the
deepObjectSize
function. #6821 - Added missing types for
instance.undoRedo
. #6346 - Added
countRenderableColumns
method to theTableView
#6887 - Added missing "hide" property in
CustomBorders
typings. #6788 - Added
beforeSetCellMeta
hook with an ability to cancel the changes. #5388 - Added additional test for autofill plugin. #6756
Changed
- Refactored hidden indexes. #6595
- Click on a row header will select all cells (also hidden). #2391
- Extracted Cell-Meta logic from Core to separate module. #6254
- The
CellMeta
manager was refactored for future features and improvements. #6233 - Rows can be resized to less than
rowHeights
. #6149 - Left mouse button (LMB) click on the corner will now select all cells. #6547
- The right mouse button (RMB) click on the corner when there is no data will show all options disabled. This has two exceptions though: Insert column right and Insert row below when a table has data type defined by dataSchema as array, except Insert row right otherwise. #6547
- Hidden indexes will no longer be rendered, as a consequence
afterRenderer
,modifyColWidth
,beforeStretchingColumnWidth
will be executable only on visible (meaning, rendered) rows and columns. #6547 - The
getColWidth
for hidden index will return 0 - it used to return 0.1. Also, it will no longer be called internally, the need can be now achieved by managers of rows and columns. #6547 - Left mouse button (LMB) click on the top left corner will now select all cells. #6547
- The
modifyColWidth
hook isn't called internally. However, it will be executed when the user will call thegetColWidth
. #6547 - IndexMapper
getPhysicalIndex
method was renamed togetPhysicalFromVisualIndex
.#6547 - IndexMapper
getVisualIndex
method was renamed togetVisualFromPhysicalIndex
.#6547 - IndexMapper
isSkipped
method was renamed toisTrimmed
.#6547 - IndexMapper
getNotSkippedIndexes
method was renamed togetNotTrimmedIndexes
.#6547 - IndexMapper
getNotSkippedIndexesLength
method was renamed togetNotTrimmedIndexesLength
.#6547 SkipMap
class was renamed toTrimmingMap
.#6547VisualIndexToPhysicalIndexMap
class was renamed toIndexesSequence
.#6547- Hidden indexes aren't rendered. As a consequence hooks
beforeValueRender
,beforeRenderer
,afterRenderer
,modifyColWidth
,beforeStretchingColumnWidth
etc. will be executed just for some of the columns (just the rendered ones). #6547 - Selection behavior changed when hiding cells from the
ContextMenu
, now it is selecting a column on the right when there is space on right to the last selected column, selecting a column on the left otherwise. - Developed a unified way to identify HOT "input" elements. All input elements owned by HOT got an attribute "data-hot-input" which are identified by that key. #6383
NestedHeaders
plugin was rewritten, from now on, only a tree-like structure will be allowed, meaning, there will be no possibility to place nested headers in-between layers. #6716CustomBorders
plugin was adapted to work withHiddenColumns
properly, from now on hiding cells at the start or at the end of a range will also hide their borders. Also, hiding a single cell with borders will hide all of its borders. #7083CollapsibleColumns
will no longer useHiddenColumns
plugin to work. #6204
Deprecated
HeaderTooltips
plugin becomes deprecated and will be removed in the next major version. #7023- IE support is depreacated and will removed by the end of the year #7026
Removed
- Removed helpers that covered IE8 support or are not needed anymore. #6525
- Removed old unnecessary warning about
beforeChange
callback. #6792 - Removed
debug
key (key, css, docs). #6672 - Removed
hiddenRow
andhiddenColumn
hooks. #6547 - Removed optional argument
modifyDocumentFocus
from thelisten
function. - Removed
rowOffset
andcolOffset
public API methods since they aliased the methods from Walkontable #6547 - Removed the experimental
GanttChart
plugin #7022 - Removed post-install warning from package.json file #6608
Fixed
- Fixed an issue where Hidden columns become visible when the user ran
updateSettings
. #4121 - Fixed an issue where using
hiddenColumns
andstretchH
showed a redundant horizontal scrollbar. #4181 - Fixed an issue in which if the last column was a hidden column and
stretchH
was enabled, the last column was displayed. #4370 - Fixed an issue where
updateSettings
performance was very low because ofhiddenColumns
being rendered. #4381 - Fixed an issue where collapse was not working correctly with custom cell renderers. #4716
- Fixed an incorrect header name when user defined more columns in the
nestedHeaders
plugin. #4716 - Fixed an issue where
hiddenColumns
did not work properly withcolumnSorting
. #5571 - Fixed an issue where
manualColumnMove
should work withhiddenColumns
. #5598 - Fixed an issue where
hiddenColumns
option interfered with the keyboard movement. #5704 - Fixed an issue where after hiding the first two rows, the row headers became de-synchronized by 1px. #5817
- Fixed an issue where hiding columns affected selection of hidden columns. #5871
- Fixed an issue where if
collapsibleColumns
were set totrue
it was impossible to exit selection mode. #5875 - Fixed an issue where
hiddenColumns
did not work properly withautoWrapRow/autoWrapCol
. #5877 - Fixed an issue on IE where hiding the first column caused a display of double border for top left corner. #5881
- Fixed an issue where
nestedHeaders
duplicated a header name if more columns are added. #5882 - Fixed an issue where
hiddenColumns
plugin unset cell'srenderer
. #5883 - Fixed an issue where
hiddenColumns
had stored visual indexes and should have used physical indexes. #5909 - Fixed an issue where the additional row was added during copy/paste operations and with hidden rows/columns enabled. #5961
- Fixed an issue where hidden columns should be unrecoverable. #6113
- Fixed an issue where row selection ignored columns that are hidden at the end. #6181
- Fixed an issue where defining data with more data than used in
columns
caused an issue with showing column once it was hidden. #6426 - Fixed an issue where hiding rows, while there was a merged area, involved caused data shifting and unexpected merged area coordinates. #6376
- Fixed an issue where some headers were gone when hidden and shown again. #6395
- Fixed an issue where
colHeader
was truncated after movinghiddenColumn
. #6463 - Fixed an issue where the last hidden column was visible upon column resizing. #6557
- Fixed an issue where with hiding columns after moved them manually. #6668
- Fixed an issue where copy-and-paste worked wrong in a cell that was hidden and then uncovered again. #6742
- Fixed an issue where too many values were pasted when the column was hidden. #6743
- Fixed an issue where expanding a collapsed column caused expanding of a child columns except for the first one. #5792
- Fixed an issue where setting
columnSorting
totrue
(on initialization or viaupdateSettings
) made headers non-collapsible programmatically viacollapseAll
method. #4999 - Fixed an issue where
customBorders
plugin was missing in the definition file. #6477 - Fixed incorrect size of
wtHider
andwtHolder
in overlays. #3873 - Fixed an issue where
updateSettings
could not updatetableClassName
. #6295 - Fixed an issue where JSON data with empty value was losing some double quotes when pasted into a cell. #6167
- Fixed an issue where some classes for the table were missing if one of them was empty. #6371
- Fixed an issue where clicking in a contextmenu's border opened the native context menu. #6218
- Fixed the error that ocurred during loading of E2E test runner in Edge and IE. #6713
- Fixed the inconsistency and problems with adding rows from the corner when all rows are trimmed. #7061
- Fixed an issue where using read-only and alignment from the context menu was disabled when all columns were selected. #7114
- Fixed an issue where setting focus to a column to open context menu after applying a filter was impossible. #7005
- Fixed an issue where
minSpareCols
withundo
added too many columns. #6363 - Fixed the inconsistency in selection when using the right mouse button for first row/column. #6334
- Fixed an issue where undoing column removal caused column headers to lack a header. #6992
- Fixed an issue where
readOnly
for column was erased (did not apply) if filters were used. #6559 - Fixed an issue where readonly property was lost after declining confirmation in
beforeRemoveCol
orbeforeRemoverow
. #6332 - Fixed an issue where
readOnly
state for some cells was lost when rows withtrimRows
turned on were removed. #6990 - Fixed incorrect column header highlight when merged cells were unmerged and
hiddenColumns
were used. #6978 - Fixed an issue where after hiding the first row, the second row top border disappeared. #6977
- Fixed an issue with incorrect selection after hiding the first row. #6831
- Fixed an issue where hiding the first row caused blue highlight in column headers selection to disappear. #6976
- Fixed wrong selection area after sorting with hidden rows. #6386
- Fixed an issue where it was not possible to use
selectAll
when the first row was hidden. #6975 - Fixed an issue where it was possible to select hidden row or column. #6974
- Fixed an issue where row indexes changed if the first row was hiding after moving row from bottom to top. #6965
- Fixed an issue where selection skipped the highest parent. #6770
- Fixed an iisue where
nestedRows
blocked table from loading if data was not provided. #6928 - Fixed an isse where it was impossible to go back to the original cell after dragging down. #4233
- Fixed an issue where keyboard navigation did not work on merged cells with hidden rows/columns. #6973
- Fixed an issue where
trimRows
andhiddenRows
with specific settings broke borders. #6904 - Fixed wrong union type for
startPosition
. #6840 - Fixed type mismatch for
Handsontable.plugins.ContextMenu
. #6347 - Fixed an issue where
manualColumnMove
did not modify thecolumns
inupdateSettings
. #5200 - Fixed rendering issue on column udpate with
updateSettings
. #3770 - Fixed an issue where expanding a collapsed column was also expanding 'child' collapsed columns, except the first child. #5792
- Fixed an issue with inproper selection for headers when the first column was hidden. #5999
- Fixed an issue where it was not possible to align cells if the selection was made upward. #6600
- Fixed an issue where
currentColClassName
did not work properly withnestedHeaders
. #5861 - Fixed an issue with scrollbar and dimension calculation in Firefox for toggling column visibility with fixed columns and
stretchH
. #6186 - Fixed an issue with undoing the nested row removal. #6433
- Fixed an isse where
getSourceData
functions returned wrong data for nested rows. #5771 - Fixed na issue where formulas plugin did not work with
nestedRows
. #4154 - Fixed an issue where nested headers and hidden columns highlighted ad additional column when used together. #6881
- Fixed an issue where
getByRange
for sourceData did not work properly with nested object data. #6548 - Fixed an issue where
window.frameElement
threw errors in MSEdge, IE and Safari. #6478 - Fixed an issue where
DataSource.countColumns
returned invalid number of columns for nested objects. #3958 - Fixed an issue where
mergedCells
with hidden cells caused problems with rendering. #7020 - Fixed an issue where it was not possible to move column when all columns were selected by
ctrl + a
. #6355 - Fixed an issue where double click on the column resize handle did not adjust size correctly. #6755
- Fixed an issue where the cell meta was retrieved using the wrong coordinates. #6703
- Fixed nested rows incorrect state after changing data. #5753
- Fixed an issue in EDGE where the dropdown menu
onMouseOut
event caused critical errors when hovering over vertical scrollbar. #6699 - Fixed an issue with too many layers of highlight with noncontinuous selection on merged cells. #7028
- Fixed an issue where
NestedHeaders
did not allow to define header level as an empty array. #7035 - Fixed an issue where passing
nestedHeaders
as a single empty array stoped the table from rendering. #7036 - Fixed an issue where opening a context menu for a column when its hidden data was selected did not block adding of rows by the menu. #7050
- Fixed an issue where it was not possible to navigate past hidden column using keyboard if
hot.updateSettings
was called inafterSelection
. #3726 - Fixed an issue where headers did not export with
exportToFile
in the specific case. #4176 - Fixed an issue with types mismatch. #6035
- Fixed an issue where manual row resize handler threw an error when bottom rows overlay was enabled. #6435
- Fixed an issue where the
afterRowResize
hook shared incorrect results in the second parameter. #6430 - Fixed an issue where the row/column resize hooks should not have returned
null
. #7074 - Fixed the loss of selection after merging from headers. #7076
- Fixed an issue where calling
updateSettings
changed the index of frozen columns viafreezeColumn
method. #6843 - Fixed an issue where deleting the last column via
updateSettings
which was part of the selection caused scroll to the bottom. #5849 - Fixed an issue where it was not possible to hide rows and merge cells at the same time. #6224
- Fixed the wrong data in merge cells after the hidden column and additionally an error occurs. #6888
- Fixed an issue where it was not possible to change cell type via
setCellMeta
. #4793 - Fixed an issue where cell editor did not dynamically changed while changing the cell type. #4360
- Fixed an issue where it was not possible to unmerge cells if part of them was hidden. #7095
- Fixed an issue where calling
clear
method removed the focus from the table. #7099 - Fixed an issue where
clear
method did not work for hidden data. #7097 - Fixed an issue where the editor was moved by 1px when the first row / column was hidden. #6982
- Fixed an issue where headers were deselected after undoing removal. #6670
- Fixed an issue with improper selection after insert column/row when mergeCells was enabled. #4897
- Fixed an issue where wrong cell meta was removed when deleting rows. #6051
- Fixed wrong types of
beforeRowMove
arguments. #6539 - Fixed an issue where selection of a whole row did not happen consequently after selecting a row header. #5906
- Fixed an issue where it was not possible to use physical row index instead of visual one. #6309
- Fixed an issue where incorrect data was returned after undoing the remove column option. #5000
- Fixed - Copy and paste works properly also when selecting hidden columns when: all columns within a selected range are hidden and when just some columns within a selected range are hidden. #7043.