View Full Version : [OPEN] TabPanel: Unable to set activeItem using itemId of child

16 Oct 2017, 1:21 PM
Setting the activeItem, in order to set the initial tab selected, fails with the error:

ext-modern-all-debug.js:8069 Uncaught Error: [Ext.createByAlias] Unrecognized alias: widget.tab2
at Ext.Inventory.instantiateByAlias (ext-modern-all-debug.js:8069)
at Object.factory (ext-modern-all-debug.js:5655)
at constructor.factoryItem (ext-modern-all-debug.js:36814)
at constructor.callParent (ext-modern-all-debug.js:7036)
at constructor.factoryItem (ext-modern-all-debug.js:57550)
at constructor.applyActiveItem (ext-modern-all-debug.js:37184)
at constructor.setter [as setActiveItem] (ext-modern-all-debug.js:6204)
at Ext.Configurator.configure (ext-modern-all-debug.js:6461)
at constructor.initConfig (ext-modern-all-debug.js:7061)
at constructor (ext-modern-all-debug.js:10395)

Sample code to reproduce the problem:

import React, { Component } from 'react'
import { Container, TabPanel } from '@extjs/ext-react';

export default class MyExample extends Component {
render() {
return (
<TabPanel activeItem="tab2">
<Container title="Tab 1" itemId="tab1">
This is content for Tab 1!
<Container title="Tab 2" itemId="tab2">
This is content for Tab 2!
<Container title="Tab 3" itemId="tab3">
This is content for Tab 3!

Related: https://www.sencha.com/forum/showthread.php?356296

I've also tried setting it with a `#` prefix, with no success...

15 Nov 2017, 2:47 AM
It’s been a month.... any chance we can get a confirmation from Sencha on this bug? Perhaps some confidence it’s going to be resolved??

15 Nov 2017, 3:20 PM
I linked the bug report to this thread. This has been fixed for 6.5.3 and 6.6.

15 Nov 2017, 3:22 PM
Thanks @tristan.lee! Can’t wait for 6.6 ;)