Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • getFilterEditorCriteria return value depends on horizontal scrollbar position

    Hi there
    Reproduced in newest version: SmartClient Version: v11.0p_2017-03-29/EVAL Development Only
    Browser: any, I tested it on Chrome 49.0.26***
    Steps can be reproduced on slightly modified example from Grids demo included in downloadable distro.


    Summary:
    Modified version of Grids->Data binding->Local data example from demo. Below example shows how getFilterEditorCriteria misbehaves on wide ListGrids with horizontal scrollbar. Intentionally I added wide columns to be able to demonstrate this behaviour. I add member_g8 column as first column. I check filter editor for this column so that only members of g8 are visible in grid. Then if G8 column is in view (that is not scrolled out of view) and I call

    countryList.getFilterEditorCriteria(true) i get proper criteria with g8 set to true.

    However when I scroll (horizontally) so that G8 editorFilter column is out of view countryList.getFilterEditorCriteria(true) will not return any criteria. So result of this call is scroll dependant while it should not be.

    To reproduce jest modify slightly you demo.

    localDatar.js renders grid that has columns wide enough for this bug to be observable. In production application we also have wide grid with scrollbar but in our case we just have many columns. Here for the purpose of example I made only 3 columns wide enough to simulate this.

    Code to reproduce:

    Code:
    customCountryData = [
    
        {
            continent:"North America",
            countryName:"United States",
            countryCode:"US",
            area:9631420,
            population:298444215,
            gdp:12360.0,
            independence:new Date(1776,6,4),
            government:"federal republic",
            government_desc:2,
            capital:"Washington, DC",
            member_g8:true,
            article:"http://en.wikipedia.org/wiki/United_states"
        },
        {
            continent:"Asia",
            countryName:"China",
            countryCode:"CH",
            area:9596960,
            population:1313973713,
            gdp:8859.0,
            government:"Communist state",
            government_desc:0,
            capital:"Beijing",
            member_g8:false,
            article:"http://en.wikipedia.org/wiki/China"
        }
    ]
    
    
    
        isc.DataSource.create({
        ID: "customCountryDS",
        fields:[
            {name:'member_g8', type:'boolean'},
            {name:"countryCode", title:"Code"},
            {name:"countryName", title:"Country"},
            {name:"independence", title:"Independence", type:"date"},
            {name:"population", title:"Population", type:"integer"},
            {name:"gdp", title:"GDP ($B)", type:"float"}
        ],
        clientOnly: true,
        testData: customCountryData
    });
    
    
    isc.ListGrid.create({
        ID: "countryList",
        dataSource:customCountryDS,
        autoFetchData:true,
        width:500,height:400,showFilterEditor:true,
        fields:[
            {name:"member_g8", title:"g8",width:100, type:'boolean'},
            {name:"countryCode", title:"Code",width:500},
            {name:"countryName", title:"Country",width:500},
            {name:"population", title:"Population",width:500}
        ]
    
    
    });


    Screencast:

    I recorded movie showing how to reproduce this:
    https://youtu.be/WbpWnCBq_io

    My 3 cents:
    When I look at getFilterEditorCriteria parameter I think your intention was to return criteria set for fields that user intentionally hid from view (not visible) but as for this moment result of this call is dependent on whether column is obstructed from view by another widget. If that was your intention fine but what would be purpose of such API
    Last edited by lkucharski; 3rd Apr 2017, 03:21.

  • #2
    The problem here is that you've assigned about 30 columns with the same name - item names are unique, so that's invalid.

    Give them different names, and either assign them a SelectItem editorType or a width (so they overflow the grid and show a scrollbar) and you should see things work as you expect.

    Comment


    • #3
      Originally posted by Isomorphic View Post
      The problem here is that you've assigned about 30 columns with the same name - item names are unique, so that's invalid.

      Give them different names, and either assign them a SelectItem editorType or a width (so they overflow the grid and show a scrollbar) and you should see things work as you expect.
      Greetings Isomorphic Team. I apologize for badly prepared example. My point was to demonstrate another issue which is not related to obvious mistakes I made in posted code. I edited my previous post and made simple version for you to be able to reproduce this ( client side datasource and filtering). See above.
      Please read my previous post carefully and look at Youtube screencast. My issue here is not with how ListGrid looks or its size. Issue here is that getFilterEditorCriteria(true) call has bug which is apparent when ListGrid content is wide enough. It simply returns different result depending on horizontal scrollbar position.

      Many tables in application for our customer has above 20 columns and our customer has filter related issues when looking at grids scrolled till the end (horizontally)

      Comment


      • #4
        Ok, we see the issue now and it's been addressed for builds dated April 5 and later.

        Comment


        • #5
          Thank you.

          Originally posted by Isomorphic View Post
          Ok, we see the issue now and it's been addressed for builds dated April 5 and later.
          Last edited by lkucharski; 5th Apr 2017, 03:47.

          Comment

          Working...
          X