Comments (4)
@yesusagayarajs I have the same issue, did you find the solution?
thank you.
from x-spreadsheet.
I made it empty for index.less file . now it is working .
from x-spreadsheet.
Thank you , it is working now
from x-spreadsheet.
Hi @IbrahimAlhaj9 Please add your header section text display name and value as tablefieldname.
"rows": {
"0": {
"cells": {
"0": {
"text": "Asunto",
"value": "subject",
"style": 10,
"editable": false,
"required":true,
"type":"text"
},
"1": {
"text": "type",
"value": "typ",
"style": 10,
"editable": false,
"required":true,
"type":"picklist"
},
}
}
}
this.spreadsheetData = new Spreadsheet("#testSheet", {
mode: "edit",
//showToolbar: true,
showGrid: true,
//showContextmenu: true,
view: {
height: function () {
return 400;
},
width: function () {
return 1200;
}
},
row: { len: 10, height: 25 },
col: {
len: 4,
width: 100,
indexWidth: 60,
minWidth: 60
}
})
.loadData(this.testSheetData)
.change((data) => {
this.onchangeData(data)// onchange function
});
//console.log(mySpreadSheet.validate());
this.spreadsheetData.on('cell-edited', (cell, ri, ci) => {
console.log('cell:', cell, ', ri:', ri, ', ci:', ci);
})
//You will map the based the row values
let header = rows[0]['cells'];
for(let index in header) {
let fieldName = header[index].value;
let val='';
if(resRe[fieldName]!=undefined) {
if (typeof resRe[fieldName] === 'string' || resRe[fieldName] instanceof String) {
val=resRe[fieldName];
fieldValue[index]={'text':val,'id':rec};
}else {
if(fieldName=='ref_product') {
if(resRe[fieldName].length>0) {
val = resRe[fieldName][0].label;
}
}else {
val=resRe[fieldName].label;
}
fieldValue[index]={'text':val,'id':rec};
}
}else {
fieldValue[index]={'text':val,'id':rec};
}
}
from x-spreadsheet.
Related Issues (20)
- .less
- Here some recommendations to make it better and essentials
- How to disable default cell selection
- how to dispose the Spreadsheet?
- 如果这个插件嵌入后 能支持 obsidian-webpage-export 插件就完美了
- Incorrent col name
- Limited Row numbers
- 模糊
- 如何支持自定义表头内容
- 标题栏显示错误
- loadData会让表单获得焦点 HOT 1
- [BUG]:read模式下还可以双击工作簿名称修改工作簿名称
- Sort and filter not work correctly
- 决定渲染的行列的数据是rows和cols吗
- import { h } from './component/element';
- 决定渲染多少行能不能不要交给rows中的len属性,而是直接读取多少数据就渲染多少行
- 如何渲染指定的某个sheet HOT 1
- 在长屏幕有滚动条的情况下 表格会自动定位到可视窗口 ,如何解决
- 如何自定义修改工作簿名称的逻辑,可以保证工作簿名称的唯一性
- How to get calculated value from a formula
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x-spreadsheet.