Search code examples
reactjsextjsextreact

The Ext React renderer function if throwing the error below, I want to combine two fields from the record as a single column using the renderer


<Grid store={store}>
    <Column
        text='Dispatch and Receipt Locations'
        flex={1]
        renderer={(value, record) => {
        return record.get('DispatchLocation') + ' to ' + record.get('ReceiptLocation')
        }}
    />
</Grid>

I am getting the below error:

Uncaught Error: [Ext.create] Unrecognized class name / alias: widget.renderercell at
Object.create (ext.js:11776) at constructor.createCell (ext.js:82542) at
constructor.insertColumn (ext.js:82429) at constructor.addColumn (ext.js:82405) at
constructor.onAdded (ext.js:82401) at constructor.doAdd (ext.js:41374) at
constructor.add (ext.js:41339) at constructor.addDataItem (ext.js:70703) at
constructor.callParent (ext.js:10561) at constructor.addDataItem (ext.js:71606)


Solution

  • You need to require the renderercell package in webpack.config.js and need to be imported.

    packages: ['ext-react-renderercell'],
    

    or in Ext-React > 6 :

    packages: ['renderercell']