PDA

View Full Version : [OPEN] Javascript error when click on disabled column menu in grid header



emaze
30 Aug 2017, 7:29 AM
Hi Mark,
to disable grid headers menu I use columnMenu={null} as reported by docs.
However if I click on arrows in the grid header I receive an error in browser console:

Error: [Ext.create] Invalid class name or alias 'undefined' specified, must be a non-empty string

A simple example to reproduce error:


import React, { Component } from 'react'
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} columnMenu={null}>
<Column text="Name" dataIndex="name" flex="1"/>
<Column text="Email" dataIndex="email" flex="1"/>
<Column text="Phone" dataIndex="phone" flex="1"/>
</Grid>
)
}
}

Gary Schlosberg
1 Sep 2017, 2:58 PM
Thanks for the report. Looks like this is an Ext JS bug being tracked as EXTJS-25837.