[FIXED] [#877] [3.2.1] ComponentView plugin possible issue

  1. #1

    [FIXED] [#877] [3.2.1] ComponentView plugin possible issue

    Hello,

    If extjs field from component view in all dataview items then all works fine, but if at list one item doesn't contain extjs field then all fields immediately lose focus after focus.

    Example (just click on any text field in item):

    @using Ext.Net;
    @using Ext.Net.MVC;
    
    @{
        Layout = null;
        var X = Html.X();
    }
    
    @functions {
        private List<object> GetData()
        {
            List<object> data = new List<object>();
    
            for (int i = 0; i < 10; i++)
            {
                data.Add(new { value = "Value " + i });
            }
    
            return data;
        }
    }
    
    <!DOCTYPE html>
    
    <html>
    <head>
    </head>
    <body>
        @(Html.X().ResourceManager().Theme(Theme.CrispTouch).ScriptMode(Ext.Net.ScriptMode.Debug))
    
        @(X.DataView()
            .ItemSelector("div.d-item")
            .Width(1000)
            .Height(500)
            .Store(X.Store()
                .Fields(
                    X.ModelField().Name("value")
                )
                .Data(GetData())
            )
            .Tpl(X.XTemplate()
                .Html(
                    @<text>
                        <tpl for=".">
                            <div class="d-item">
                                <tpl if="xindex % 2 === 0">
                                    {TextField}
                                <tpl else>
                                    {value}
                                </tpl>
                            </div>
                        </tpl>
                    </text>)
            )
            .Plugins(
                X.ComponentView()
                    .Items(
                        X.ViewItem()
                            .Value("TextField")
                            .BoundField("value")
                            .Component(
                                X.TextField()
                            )
                    )
            )
        )
    
    </body>
    </html>
    Last edited by Daniil; Aug 21, 2015 at 4:53 PM. Reason: [FIXED] [#877] [3.2.1]
  2. #2
    Hi Yury,

    Thank you for the report!

    Created an Issue.
    https://github.com/extnet/Ext.NET/issues/877

    Fixed in the revision #6538 (trunk). It goes to 3.2.1.

Similar Threads

  1. Replies: 3
    Last Post: Jan 16, 2015, 1:15 PM
  2. [CLOSED] fireEvent issue in plugin
    By multimediait in forum 2.x Premium Help
    Replies: 2
    Last Post: May 20, 2014, 11:15 AM
  3. Replies: 0
    Last Post: Dec 29, 2013, 6:41 PM
  4. DataView with ComponentView - Form bind
    By infotex in forum 2.x Help
    Replies: 3
    Last Post: Apr 29, 2013, 7:33 AM
  5. [CLOSED] GroupingSummary plugin issue
    By bakardi in forum 1.x Premium Help
    Replies: 6
    Last Post: Nov 18, 2011, 8:18 PM

Tags for this Thread

Posting Permissions