错误:扩展弹出菜单的一部分节点时,ExtJS TreeList Microview损坏

问题描述

我最近在当前树列表中发现了一个对我来说至关重要的错误: 重现步骤:

  1. 打开Fiddle
  2. 点击“微型”按钮
  3. 将鼠标悬停在“主页”图标上以查看弹出子导航
  4. 点击“存档”后面的箭头

结果: 它正在关闭列表。当您再次将鼠标悬停在菜单上时,它将引发js错误Uncaught TypeError: Cannot read property 'un' of null at constructor.unfloatAll (ext-all-debug.js:144478) 如果再次将鼠标悬停在它上面,它将打开,并且列表按预期扩展。

已预期:展开子菜单之一后,悬停菜单不会关闭。它将保持打开状态并正确展开列表。

这是在Ext6.2上运行的,并且至少从7.2开始就被破坏了(尚未测试以前的版本)。

任何解决方法或覆盖方法将不胜感激。

Ext.define('KitchenSink.view.grid.TreeListController',{
  extend: 'Ext.app.ViewController',alias: 'controller.tree-list',onMicropressedChange: function(button,pressed) {
    var treelist = this.lookupReference('treelist'),width = !treelist.getMicro() ? 44 : 250;

    treelist.setMicro(!treelist.getMicro());
    treelist.setWidth(width);
  }
});

Ext.define('KitchenSink.view.grid.TreeListModel',{
  extend: 'Ext.app.viewmodel',alias: 'viewmodel.tree-list',stores: {
    navItems: {
        type: 'tree',rootVisible: true,root: {
            expanded: true,text: 'All',children: [{
                text: 'Home',iconCls: 'x-fa fa-home',children: [{
                    text: 'Messages',iconCls: 'x-fa fa-inBox',leaf: true
                },{
                    text: 'Archive',href: '',iconCls: 'x-fa fa-database',children: [{
                        text: 'First',iconCls: 'x-fa fa-sliders',leaf: true
                    },{
                        text: 'No Icon',iconCls: null,leaf: true
                    }]
                },{
                    text: 'Music',iconCls: 'x-fa fa-music',{
                    text: 'Video',iconCls: 'x-fa fa-film',leaf: true
                }]
            },{
                text: 'Users',iconCls: 'x-fa fa-user',children: [{
                    text: 'Tagged',iconCls: 'x-fa fa-tag',{
                    text: 'Inactive',iconCls: 'x-fa fa-trash',{
                text: 'Groups',iconCls: 'x-fa fa-group',leaf: true
            },{
                text: 'Settings',iconCls: 'x-fa fa-Wrench',children: [{
                    text: 'Sharing',iconCls: 'x-fa fa-share-alt',{
                    text: 'Notifications',iconCls: 'x-fa fa-flag',{
                    text: 'Network',iconCls: 'x-fa fa-signal',leaf: true
                }]
            }]
        }
    }
  }
});

Ext.define('KitchenSink.view.grid.TreeList',{
  extend: 'Ext.Panel',requires: [
    'Ext.list.Tree','Ext.list.TreeItem'
  ],xtype: 'tree-list',title: 'TreeList',controller: 'tree-list',layout: {
    type: 'vBox',align: 'stretch'
  },viewmodel: {
    type: 'tree-list'
  },items: [{
    xtype: 'container',flex: 1,scrollable: 'y',items: [{
        xtype: 'toolbar',docked: 'top',border: false,items: [{
            xtype: 'button',allowMultiple: true,text: 'Micro',handler: 'onMicropressedChange'
        }]
    },{
        xtype: 'treelist',reference: 'treelist',bind: '{navItems}'
    }]
  },{
    xtype: 'component',cls: 'treelist-log',padding: 10,height: 50,bind: {
        html: '{selectionText}'
    }
  }]
});

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...