Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FixedHeader.jsx - fail to find DOM Node #207

Closed
GordonJones opened this issue Feb 19, 2018 · 1 comment
Closed

FixedHeader.jsx - fail to find DOM Node #207

GordonJones opened this issue Feb 19, 2018 · 1 comment

Comments

@GordonJones
Copy link

I mentioned this failure in #204 but it is unrelated to that problem, so I raise it here as a separate issue.

A couple of weeks ago I was displaying a simple tree, but in the past week I have stepped backward. I cannot tell if I am doing something stupid, whether I have hit a compatibility issue, or whether there is a genuine failure in FixedHeader.jsx.

But essentially when I try to render the grid this line in FixedHeader.jsx returns null.

var headerDOM = _reactDom2.default.findDOMNode(this);

Has anyone else hit this issue? Below is my trivial app.js

`import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Grid, Store } from 'react-redux-grid'
import './App.css';

const treeData = {
root:{
id:-1,
Name:"Root",
parentId:null,
children:[
{
id:1,
parentId:-1,
Name:"Category 1",
children:[]
}
]
}
}

const plugins = {
COLUMN_MANAGER: {
resizable: true,
moveable: true,
sortable: {
enabled: true,
method: 'local',
sortingSource: null
}
}
};

const events = {
HANDLE_CELL_CLICK: (cell, reactEvent, id, browserEvent) => {
console.log('On Cell Click Event');
}
};

const columns = [
{
name: 'Name',
width: '30%',
className: 'additional-class',
dataIndex: 'Name',
sortable: false,
expandable: true
}
];

const gridConfig = {
showTreeRootNode: false,
dataSource: null,
data: treeData,
gridType: 'tree',
dragAndDrop: true,
columns: columns,
events: events,
plugins: plugins,
stateKey: 'oneAndOnlyTree'
};

class App extends Component {
render() {
return (
<Provider store={ Store }>
<Grid { ...gridConfig } />

);
}
}

export default App;
`
and my package.json

{ "name": "ambition", "version": "0.1.0", "private": true, "dependencies": { "file-loader": "^1.1.6", "font-awesome": "^4.7.0", "react": "^16.2.0", "react-dom": "^16.2.0", "react-redux": "^5.0.2", "react-redux-grid": "^5.5.2", "react-scripts": "1.1.0", "redux": "^3.7.2" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }

@GordonJones
Copy link
Author

So I threw everything away. Created a new react app. Installed the npm registered version of react-redux-grid and its loading OK now.
I don't know how I got to this failure. I am guessing its was as a result of me trying to use the latest master checkout version.
Anyway apologies for the issue - I'll close and start again.
Gordon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant