[GH #10569] Adding columns after insterting value throws error

Tags: #<Tag:0x00007efc64e1f520> #<Tag:0x00007efc64e1f390>

Inserting a column either on the left or right after insterting a value in the table throws an error:

Uncaught TypeError: Cannot read properties of undefined (reading 'splice')
at DenseStrategy.addColumns (DenseStrategy.js:56:23)
at AddressMapping.addColumns (AddressMapping.js:145:18)
at eval (DependencyGraph.js:386:27)
at EmptyStatistics.measure (Statistics.js:50:20)
at DependencyGraph.addColumns (DependencyGraph.js:385:16)
at Operations.doAddColumns (Operations.js:602:99)
at Operations.addColumns (Operations.js:121:12)
at CrudOperations.addColumns (CrudOperations.js:53:21)
at HyperFormula.addColumns (HyperFormula.js:370:26)
at Formulas.onAfterCreateCol (formulas.js:1049:33)
at Core.eval (formulas.js:252:40)
at fastCall (function.js:312:17)
at Hooks.run (pluginHooks.js:2666:47)
at Core.runHooks (core.js:4281:48)
at DataMap.createCol (dataMap.js:480:21)
at Object.alter (core.js:578:44)
at Core.alter (core.js:2556:10)
at Core.callback (columnLeft.js:35:12)
at eval (commandExecutor.js:103:25)
at arrayEach (array.js:188:9)
at CommandExecutor.execute (commandExecutor.js:102:28)
at ContextMenu.executeCommand (contextMenu.js:290:62)
at Menu.eval (contextMenu.js:166:69)
at fastCall (function.js:312:17)
at Menu.runLocalHooks (localHooks.js:52:32)
at Menu.executeCommand (menu.js:561:12)
at Core.beforeOnCellMouseUp (menu.js:262:20)
at fastCall (function.js:312:17)
at Hooks.run (pluginHooks.js:2666:47)
at Core.runHooks (core.js:4281:48)
at onCellMouseUp (tableView.js:859:27)
at Event.callListener (event.js:391:9)
at Event.onMouseUp (event.js:299:14)
at HTMLDivElement.eval (event.js:124:24)
at HTMLDivElement.callbackProxy (eventManager.js:72:18)

Here an example:

To reproduce:

  • Click any cell
  • Click Insert Column left or right from the context menu, notice how it works
  • Insert a value in the same cell
  • Retry to insert a column and notice the error

Hi @nicola

I’m following your instruction, but I’m not able to get any errors. Can you please clarify this step?

  • Insert a value in the same cell

Do you mean the cell in newly created column, or the one you clicked initially to add the column?

I tried both ways, but still no errors.

I’ve made a video demonstration here:

Practically if I insert a value in a cell I’m not longer able to add a column.

Hi @nicola

Thank you. I was able to recreate the issue. It looks like the formulas plugin is responsible for it. I reported this bug internally, and I will update you when I get any updates on its status.

Hi @adrian.szymanski, do you have any update on this?
We are getting close to release date and need this functionality to be there. Is a github that I can follow for progress?

Hi @nicola

This issue is reported in out internal repository. We don’t put it on our roadmap yet. I will have more information on possible estimation next week.

Any progress on this issue? It has been 7 months since reported.

Hi @nicola

Unfortunately we weren’t able to work on this issue yet. We will try to add to the next possible free slot, which means it should be done around March. I will update you when we have more specific timeline.

You can also track this issue here: https://github.com/handsontable/handsontable/issues/10569