Comments (7)
I fixed it by removing my <App />
component into the <React.StrictMode>
tags.
Old index.tsx
:
import React from 'react';
import ReactDOM from 'react-dom/client';
import "@silevis/reactgrid/styles.css";
import './styles/app.css';
import App from './views/App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
reportWebVitals();
New index.tsx
(working) :
import React from 'react';
import ReactDOM from 'react-dom/client';
import "@silevis/reactgrid/styles.css";
import './styles/app.css';
import App from './views/App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<App />
);
reportWebVitals();
from reactgrid.
I tested this one on MacOS and safari, it's working fine, but not in linux for chrome / firefox, it also happenned when you try to type something into the cell
from reactgrid.
I got the same issue
from reactgrid.
Hello! As @sidikfaha posted, React's strict mode somehow breaks our logic.
We're going to investigate it, but for now please treat it as a temporary solution.
Thank you for your patience!
from reactgrid.
We're currently building the next version of ReactGrid from the ground up and decided to leave this topic in the current state. If you want to use the current version, disable the strict mode while using React 18.
from reactgrid.
currently building the next version of ReactGrid from the ground up and decided to leave this topic in the current state. If you want to use the current version, disable the strict mode while using React 18.
Hey @czerwiukk,
any news on the next ReactGrid version, when we can expect a release for it, and where can follow the news for it?
from reactgrid.
Hi,
I know a lot of developers were waiting for upgrading this amazing library to React 18.
So I have good news!!
I forked this library to my account and made the relevant changes in order to make it work in React 18.
I have tested it on my Mac but please test it also and verify everything works.
I updated React to 18, node-sass to sass and changed the config of rollup to use sass instead of node-sass.
So I succeeded to use this library with strict mode:
<React.StrictMode>
<Grid...../>
</React.StrictMode>
I will make a PR for this library so the maintainers will be able to merge it to their library.
You can install my library by:
npm install git+https://github.com/alonshmiel/reactgrid.git
And then you can use the CSS by:
@import "@silevis/reactgrid/dist/styles.scss";
And the JS by:
import {
ReactGrid,
getCellProperty,
getCharFromKeyCode,
inNumericKey,
isAllowedOnNumberTypingKey,
isAlphaNumericKey,
isNavigationKey,
isNumpadNumericKey,
keyCodes,
} from "@silevis/reactgrid/dist/core";
I faced with an error when using strict mode (can't access property "scrollableElement", t is undefined)
It was because of the strict mode.
React StrictMode calls reducer two times to eliminate any side-effects.
This error was thrown because the reducer didn't store the state so the second call didn't have the old state that it needs. That's why I stored the state.
Please open any issue you face with,
and I hope to maintain this library as much as I can since I'm gonna have a new baby boy in my family 💚
from reactgrid.
Related Issues (20)
- 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
- onCellsChanged typeerror following "Handling Data Changes" HOT 2
- Is there a way to create new rows onCellClick? HOT 3
- Is there a possibility to set selection ? HOT 6
- onBeforeAutofill HOT 1
- 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
- Chevron unfolding produces blank table portion until further interaction HOT 1
- Native select will not remain open HOT 3
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.