Comments (6)
We've published v 4.0.9
which fixes the issue - you can see our changelog here https://reactdatagrid.io/docs/changelog#4.0.9
@lavoiekeven Feel free to reopen the issue if needed.
from reactdatagrid.
I just tried it and it works fine. Post the code below to any of the source editors on the site:
import React from 'react'
import ReactDataGrid from '@inovua/reactdatagrid-enterprise'
import Button from '@inovua/reactdatagrid-community/packages/Button'
import '@inovua/reactdatagrid-enterprise/index.css'
const gridStyle = { minHeight: 550 }
const columns = [
{ name: 'id', header: 'Id', defaultVisible: false, type: 'number', maxWidth: 40 },
{ name: 'firstName', header: 'First Name', defaultFlex: 2 },
{ name: 'lastName', header: 'Last Name', defaultFlex: 2 },
{ name: 'email', header: 'Email', defaultFlex: 3 }
];
function App() {
const [dataSource, setDataSource] = React.useState([]);
const loadData = () => {
setDataSource([{ id: 1, firstName: 'test', lastName: "test1", email: '[email protected]' }]);
}
return (
<div>
<h3>Sort with remote data</h3>
<div>
<Button onClick={loadData}>Load async data</Button>
<Button
onClick={() => setDataSource([])}
style={{ marginLeft: 10 }}
>Clear data</Button>
</div>
<ReactDataGrid
idProperty="id"
style={gridStyle}
columns={columns}
dataSource={dataSource}
/>
</div>
);
}
export default () => <App />
from reactdatagrid.
@inovua/reactdatagrid-community version not @inovua/reactdatagrid-enterprise
I tried with node v12.19.0 and v14.15.0 on Chrome and Edge Chromium.
from reactdatagrid.
Thanks for reporting. Strangely enough, the same code is working fine in our examples, though definitely not working in the reproduction repo.
We noticed you're using React 17.0.1 and initially thought that might cause the issue, but even when downgrading to react 16.14.0 it is still reproducible.
We're on it
from reactdatagrid.
Even more oddly, it does work in the repro repo if you build the app for deployment - npm run build
and then test in the deployed folder.
from reactdatagrid.
Turns out it's strict mode - this issue casts more light into the problem facebook/react#15074
We're actively working for coming up with a fix on this - thanks for reporting
from reactdatagrid.
Related Issues (20)
- Title on cell content HOT 1
- Inconsistent approach to defining active styles
- The first row has two items overlapped when using dynamic row height HOT 1
- SASS Deprecation Warning - Using / for division outside of calc()
- 🐛 Incorrect Header floating when scrolling and grouping + sticky header rows
- Can't clear filter when customized
- 🐛 row disappears when reordering tree grid
- Dynamic Method of Disabling Rows
- 🐛 The filter function is not working
- Autosize all columns function crashes when there is rowspan configuration set for columns.
- 🐛 Bug: setColumnSizeAuto throws when column virtualization is enabled HOT 1
- React Data Grid - Next.js Error HOT 7
- Autosize all columns function crashes when grid has more then 15 columns and columnVirtualization is enabled HOT 1
- The Clear/Clear All filter menu crashes after changing enableFiltering to false and then returning it back to true.
- Is this library actively maintained?
- Incorrect onRowDoubleClick behaviour with scroll HOT 2
- Duplicate cells when scrolling
- Combine filtering and loadNode
- 💡 Add tooltip to cell rows
- Running setColumnsSizesAuto with virtualization does not size columsn not in view
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 reactdatagrid.