Comments (2)
Describe the bug A clear and concise description of what the bug is. When following the docs https://reactgrid.com/docs/4.0/2-implementing-core-features/1-handling-changes/, I am getting the type error when assigning
handleChanges
toonChange
No overload matches this call. Overload 1 of 2, '(props: ReactGridProps | Readonly<ReactGridProps>): ReactGrid', gave the following error. Type '(changes: CellChange<TextCell>[]) => void' is not assignable to type '(cellChanges: ({ readonly rowId: Id; readonly columnId: Id; readonly type: "checkbox"; readonly previousCell: CheckboxCell & Cell; readonly newCell: CheckboxCell & Cell; } | ... 7 more ... | { ...; })[]) => void'. Types of parameters 'changes' and 'cellChanges' are incompatible. Type '({ readonly rowId: Id; readonly columnId: Id; readonly type: "checkbox"; readonly previousCell: CheckboxCell & Cell; readonly newCell: CheckboxCell & Cell; } | ... 7 more ... | { ...; })[]' is not assignable to type '{ readonly rowId: Id; readonly columnId: Id; readonly type: "text"; readonly previousCell: TextCell; readonly newCell: TextCell; }[]'. Type '{ readonly rowId: Id;
Current behavior A clear and concise description of what you current see. Type Error
Expected behavior A clear and concise description of what you expected to happen. No type error
Screenshots or gifs If applicable, add screenshots to help explain your problem.
**Your environment details**Chrome desktop
An error might mean something like this: your function only handles TextCell type changes, but your component needs a function that handles changes including CheckboxCell and many other types.
from reactgrid.
This is related to #128. I posted a solution for this in the mentioned issue's comment.
from reactgrid.
Related Issues (20)
- Is there a way to make Tooltips on the sheet? HOT 4
- Initial render does not display all rows HOT 7
- May I ask if there is a bus schedule for the release of the version, if there is, the user does not need to ask when it will be released HOT 4
- When the last line is bottomed, the right-click context menu is also bottomed, and the menu item is covered and cannot be selected HOT 2
- Question/Feature request - Update state on keyDown HOT 1
- When supporting the need for double check, a carriage return is required in a single text cell and onCellsChanged is triggered, changes become an array of one element, but a two-element array HOT 8
- Does not insert data correctly from Excel into Windows HOT 6
- checkbox cannot auto-fill HOT 4
- Working Example of MultiUsers HOT 1
- Working example for budget planner HOT 1
- The v5-dev branch failed to start HOT 2
- bug: Column resize handle is unclickable in last column [V4, Firefox]
- Collapsible/expandable nonEditable chevronCell HOT 1
- Is there a way to create new rows onCellClick? HOT 3
- Is there a possibility to set selection ? HOT 6
- onBeforeAutofill HOT 2
- Performance optimization: The number of table rows reaches more than 5000, even if virtual scrolling is turned on, editing and updating cells is still very slow HOT 2
- moveDownOnEnter onCellsChanged is triggered twice
- Automatically adjust column width
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 reactgrid.