emaze
17 Aug 2017, 5:23 AM
Hi, in a Grid with hideHeaders property setted to true if I haven't loaded data into store I see the headers...
With data into store
import React, { Component } from 'react';
import { launch } from '@extjs/reactor';
import { Grid, Column} from '@extjs/ext-react';
export default class MyExample extends Component {
store = new Ext.data.Store({
data: [
{ "name": "Lisa", "email": "[email protected]", "phone": "555-111-1224" },
{ "name": "Bart", "email": "[email protected]", "phone": "555-222-1234" },
{ "name": "Homer", "email": "[email protected]", "phone": "555-222-1244" },
{ "name": "Marge", "email": "[email protected]", "phone": "555-222-1254" }
]
});
render() {
return (
<Grid store={this.store} ref={grid=>this.grid=grid} hideHeaders={true}>
<Column text="name" dataIndex="name"/>
</Grid>
)
}
}
launch(<MyExample />);
Without data into store
import React, { Component } from 'react';
import { launch } from '@extjs/reactor';
import { Grid, Column} from '@extjs/ext-react';
export default class MyExample extends Component {
store = new Ext.data.Store({
data: []
});
render() {
return (
<Grid store={this.store} ref={grid=>this.grid=grid} hideHeaders={true}>
<Column text="name" dataIndex="name"/>
</Grid>
)
}
}
launch(<MyExample />);
Is this the desired behaviour?
With data into store
import React, { Component } from 'react';
import { launch } from '@extjs/reactor';
import { Grid, Column} from '@extjs/ext-react';
export default class MyExample extends Component {
store = new Ext.data.Store({
data: [
{ "name": "Lisa", "email": "[email protected]", "phone": "555-111-1224" },
{ "name": "Bart", "email": "[email protected]", "phone": "555-222-1234" },
{ "name": "Homer", "email": "[email protected]", "phone": "555-222-1244" },
{ "name": "Marge", "email": "[email protected]", "phone": "555-222-1254" }
]
});
render() {
return (
<Grid store={this.store} ref={grid=>this.grid=grid} hideHeaders={true}>
<Column text="name" dataIndex="name"/>
</Grid>
)
}
}
launch(<MyExample />);
Without data into store
import React, { Component } from 'react';
import { launch } from '@extjs/reactor';
import { Grid, Column} from '@extjs/ext-react';
export default class MyExample extends Component {
store = new Ext.data.Store({
data: []
});
render() {
return (
<Grid store={this.store} ref={grid=>this.grid=grid} hideHeaders={true}>
<Column text="name" dataIndex="name"/>
</Grid>
)
}
}
launch(<MyExample />);
Is this the desired behaviour?