Changes in colToProp and propToCol methods #7144
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR realise idea to return
null
for indexes beyond the table boundaries while callingpropToCol
method. However, there should be done yet more significant changes which affect lot of places in Handsontable.propToCol
returnsnull
for not existing propertiescolToProp
returnsnull
for indexes beyond the table boundariescolToProp
returnnull
for not existing propertyhandsontable/src/dataMap/dataMap.js
Lines 198 to 201 in 398178d
colToProp
return-1
after handling-1
as argument (considering row header)?colToProp
returnnull
after handling-2
as argument (considering row header)?colToProp
andpropToCol
work on physical indexes (to perform translation also on trimmed indexes properly)?colToProp(number)
andpropToCol(number)
returnnumber
or translated number (to visual/physical index)?colToProp(x) === propToCol(colToProp(x))
?getSourceDataAtCol
,getSourceDataAtCell
andgetAtCell
(internally function) work on physical indexes.