jspreadsheet / jspreadsheet/ce

Setting the readonly property to true makes the cell value disappear

Open
#1,729 1 comment 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

Hi, i have a strange behavior in my code
I'm trying to add dynamically a column to my jexcel instance,
Everything is fine for the first added data, I can set columns to readonly.
When i set my column to readonly, the value of the cells disappears, it is not present in the DOM either. But the value is still passed in the method excel.setRowData.

Image

This is the dynamic object that I construct and I pass as a property of my column. If I change readonly to true, the value of the cells concerned disappears.

Image

This is where I add the raw data, in rawdata object i can see the value but nothing in my sheet view.

I would really appreciate it if anyone has a solution to this problem 😃.
thanks in advance 🙏

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 by reproducing the issue with the dynamically constructed column object, readonly: true, and the excel.setRowData call described in the report. Compare the raw data with the rendered sheet and confirm that readonly cells retain their visible values and DOM content.

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.