Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2870 in a recent build.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    1
    Vote Rating
    0
    ettaruzzo is on a distinguished road

      0  

    Default DataView and inline config

    DataView and inline config


    REQUIRED INFORMATION

    Ext version tested:
    • Sencha Touch 2.0.0
    Browser versions tested against:
    • Google Chrome 18
    Description:
    • Ext.dataview.DataView - if I set inline: true in a DataView that use a DataItem, the config will be ignored.
    Steps to reproduce the problem:
    • Create a DataItem
    • Create a DataView, set inline:true end use the DataItem
    The result that was expected:
    • The items should be displayed to inline-block and arranged horizontally
    The result that occurs instead:
    • The items will be displayed like the inline config was not present
    Test Case:
    Code:
    Ext.define('MyListItem', {    extend: 'Ext.dataview.component.DataItem',
        requires: ['Ext.Button'],
        xtype: 'mylistitem',
    
    
        config: {
            nameButton: true,
    
    
            dataMap: {
                getNameButton: {
                    setText: 'name'
                }
            }
        },
    
    
        applyNameButton: function(config) {
            return Ext.factory(config, Ext.Button, this.getNameButton());
        },
    
    
        updateNameButton: function(newNameButton, oldNameButton) {
            if (oldNameButton) {
                this.remove(oldNameButton);
            }
    
    
            if (newNameButton) {
                this.add(newNameButton);
            }
        }
    });
    
    
    Ext.create('Ext.DataView', {
        fullscreen: true,
        inline: true,
        store: {
            fields: ['name', 'age'],
            data: [
                {name: 'Jamie Avins',  age: 100},
                {name: 'Rob Dougan',   age: 21},
                {name: 'Tommy Maintz', age: 24},
                {name: 'Jacky Nguyen', age: 24},
                {name: 'Ed Spencer',   age: 26}
            ]
        },
    
    
        useComponents: true,
        defaultType: 'mylistitem'
    });

    HELPFUL INFORMATION

    Screenshot or Video:
    • none
    See this URL for live test case:
    • none

    Debugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Windows 7

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thank you for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    The following CSS should fix it until the next release:

    Code:
        <style>
            .x-dataview-inlineblock .x-data-item {
                display: inline-block !important;
            }
        </style>

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
    jcarol is on a distinguished road

      0  

    Default Broken again

    Broken again


    Seems to be broken again in Touch 2.3.1. Same code as originally posted will reproduce the problem.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
    jcarol is on a distinguished road

      0  

    Default Workaround

    Workaround


    The workaround suggested earlier doesn't work, because those styles are already present on the dataview. What seems to be the problem is the x-list style being present, so I worked around it by adding an initialize method for my dataview, which simply wipes out the x-list class, replacing it with x-list-inlineblock. I have not found any bad side effects yet :-)

    initialize: function() {
    this.callParent();
    // work around a bug for inline dataviews
    this.setBaseCls("x-list-inlineblock");
    }