Comments (5)
Please can you share the article on rows and column updates example.
from fortune-sheet.
https://ruilisi.github.io/fortune-sheet-docs/guide/api.html#overview, API is avaible via the ref of Workbook
from fortune-sheet.
App.js
import
React, { useRef, useState, useEffect, useCallback } from "react";
import ReactDOM from 'react-dom';
import "./styles.css";
import { Workbook } from "@fortune-sheet/react";
import "@fortune-sheet/react/dist/index.css"
import { produce } from "immer";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Sheet } from "@fortune-sheet/core";
export default {
component: Workbook,
} as ComponentMeta;
const settings = [
{
name: "Terminal",
id: 0,
status: 1,
defaultRowHeight: 20,
scrollLeft: 0,
column: 25,
row: 20,
config: {rowlen: {"0": 50}},
celldata: [ {"r": 0,"c": 0,"v": {ct: {fa: "General", t: "g"},m:"Nameofthescript",v:"Name of the script","bg": "#858a7e","ht":"0"},},
{"r": 0,"c": 1,"v": {ct: {fa: "General", t: "g"},m:"BuyRate",v:"Buy Rate","bg": "#00ff00","ht":"0"},},
{"r": 0,"c": 2,"v": {ct: {fa: "General", t: "g"},m:"Quantity",v:"Quantity","bg": "#00ff00","ht":"0"},}
]
}
];
const App = () => {
const [sheets, setSheets] = useState(settings);
const onChange = useCallback((d: Sheet[]) => {
d[0]["data"][0][1] = {ct: {fa: "General", t: "g"},m:"Values",v:"Buy","bg": "#00ff00","ht":"0"};
setSheets(d);
}, []);
return ;
};
export default App;`
above code failing with semi colon issue with below line of code.
export default {
component: Workbook,
} as ComponentMeta;
Please can you guide what went wrong with
from fortune-sheet.
Maybe you should delete ',' at
.
In addition, this error is not related to this project.
from fortune-sheet.
Thanks, please can you provide js example. We have only typescript examples. It will be helpful @shuanhukexuejia
Please add multiple example in react js like
- Update cell continually by math.random()
- Update sheet by consolidating multiple sheet.
- Onchange and readonly cell dynamically
- Adding UI components like chart, button.
- Onchange vs auto update cell by math.random()
- Like view example we couldn't found much over internet and it will helpful for starting
I started on this library recently I will post few example for reference once am good with library.
If
from fortune-sheet.
Related Issues (20)
- open local sheet file HOT 1
- Performance issues with big sheets
- Formula grammar online edit/test HOT 1
- API Documentation HOT 2
- Sheet not found when using API
- ios15.X版本无法编辑
- 安卓手机居中显示错误 HOT 11
- 下拉框点击
- Read-only cell HOT 2
- 复制粘贴功能
- 文档保护开启后允许的区域不生效。
- Undo operation after changing a cell with linked formulae does not change the cell itself HOT 4
- Formula value calculation before render HOT 2
- Dragging cell values does not update linked formulae
- Adding support in the library for Finnish language HOT 1
- Cell formats not applied when importing data HOT 1
- Copying from excel to fortune sheet and vice versa doesnt work HOT 1
- Selection calculation breaks for NaN HOT 1
- Cell hyperlinks not working HOT 1
- Link tooltip is unselectable if two vertically adjacent cells have hyperlinks
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 fortune-sheet.