jspreadsheet / jspreadsheet/ce

updataMeta need to be patched for deleting column

Open
#1,385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.2k
Forks
890
PR merge metrics
No merged PRs in 30d

Description

There's some problem when delete column with meta information handling.
Because of this, columns right after has wrong meta infomations. (has meta informations of deleted column)

I tried to fix this issue like followins for temporary, but doesn't look good.. please check and give your opinions..

obj.updateMeta = function(affectedCells) {
if (obj.options.meta) {
var newMeta = {};
var keys = Object.keys(obj.options.meta);
for (var i = 0; i < keys.length; i++) {
if (affectedCells[keys[i]]) {
...
+ } else if (Object.values(affectedCells).indexOf(keys[i]) == -1) {
...
}
}
// Update meta information
obj.options.meta = newMeta;
}
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the updateMeta function shown in the issue and reproduce deleting a column that has metadata. Trace how affectedCells is handled, then verify that columns after the deleted column retain their own metadata rather than inheriting the deleted column's information.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.