Results 1 to 3 of 3

Thread: NavigationView fails to listen to child views' bound titles

    You found a bug! We've classified it as EXTJS-27780 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User sdodierl's Avatar
    Join Date
    Oct 2017
    Location
    Paris
    Posts
    22

    Default NavigationView fails to listen to child views' bound titles

    Minimal Working Example
    Code:
    Ext.define('ExtJSBUG.NavigationView.MWE', {
        extend: 'Ext.Container',
        xtype: 'mwe',
    
    
        config: {
            layout: 'vbox',
            items: [{
                xtype: 'navigationview',
                reference: 'nav',
                flex: 1,
                items: [{
                    xtype: 'mwepanel',
                    layout: 'vbox',
                    items: [{
                        xtype: 'button',
                        text: 'Push a new view!',
                        handler: () => {
                            this.lookupReference('nav').push({
                                title: 'Second',
                                html: 'Second view!',
                            });
                        },
                    }],
                }],
            }],
        },
    });
    
    
    
    
    Ext.define('ExtJSBUG.NavigationView.MWEPanel', {
        extend: 'Ext.Panel',
        xtype: 'mwepanel',
    
    
        viewModel: 'mwepanel',
    
    
        bind: {
            title: '{boundTitle}',
        },
    });
    
    
    
    
    Ext.define('ExtJSBUG.NavigationView.MWEPanelViewModel', {
        extend: 'Ext.app.ViewModel',
        alias: 'viewmodel.mwepanel',
    
    
        data: {
            boundTitle: 'Edit Stuff',
        },
    });
    Problem Description

    If I use a NavigationView with panels that have their title bound, the navigation view will fail to pick them up.

    If, as a workaround, I also define an empty title in the config, then only the config's original title will be taken into account, rather than the one updated by the binding.

    The problem is NavigationView ignores bindings. It also ignores titles put in eventedConfig and does not seek to listen to updates on the title.

    For me the core problem is that no data binding is in place between child view title and NavigationView. However if that somehow was impossible then at least titles put in eventedConfig should be supported. The doc should also be clearer about current limitations / about how the child view's title is read.
    We're recruiting

    EcoMundo is looking for ExtJS architects and developers in their offices in 🇫🇷 Paris, 🇲🇬 Tananarive and 🇻🇳 Ho Chi Minh City!

    Check out https://www.ecomundo.eu/fr/recrutement or get in touch with me. We're a global actor in software for chemical regulatory compliance, with the size and state of mind of a start-up.

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006

    Default

    Thank you for sharing this with us. I have passed this along to the support team and asked them to look into this at their earliest convenience.

    Thanks,

    Michele

  3. #3
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    538

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

    Fiddle: https://fiddle.sencha.com/

Similar Threads

  1. Replies: 3
    Last Post: 4 Feb 2015, 6:50 AM
  2. Replies: 1
    Last Post: 15 Oct 2014, 3:29 PM
  3. Replies: 4
    Last Post: 30 May 2014, 8:19 AM
  4. NavigationView Events Not Bound when View is Not Top Level
    By vote539 in forum Sencha Touch 2.x: Bugs
    Replies: 4
    Last Post: 16 Jan 2014, 9:00 AM
  5. NavigationView adding buttons on certain views
    By dewil_de in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 13 Jun 2012, 5:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •