Announcement

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

    two problems with the filterEditor in a pickList with customSelectExpression field

    SmartClient Version: SNAPSHOT_v11.1d_2017-02-23/Enterprise Development Only (built 2017-02-23)

    Chrome 56.0.2924.87 (64-bit) on OSX Sierra

    Hello, please modify the supplyItem dataSource like this:

    Code:
    <DataSource
        ID="supplyItem"
        serverType="sql"
        tableName="supplyItem"
        titleField="itemName"
        testFileName="/examples/shared/ds/test_data/supplyItem.data.xml"
        dbImportFileName="/examples/shared/ds/test_data/supplyItemLarge.data.xml"
    >
        <fields>
           <field name="nameSKU" type="text"
                   customSelectExpression="supplyItem.itemName || ' ' || supplyItem.SKU"/>
            <field name="itemID"      type="sequence" hidden="true"       primaryKey="true"/>
            <field name="itemName"    type="text"     title="Item"        length="128"       required="true"/>
            <field name="SKU"         type="text"     title="SKU"         length="10"        required="true"/>
            <field name="description" type="text"     title="Description" length="2000">
                <validators>
                    <validator type="required" dependentFields="category">
                        <applyWhen operator="and">
                            <criteria>
                                <criterion fieldName="category" operator="equals" value="Adding Machine/calculator Roll"/>
                            </criteria>
                        </applyWhen>
                    </validator>
                </validators>
            </field>
            <field name="category"    type="text"     title="Category"    length="128"       required="true"
                   foreignKey="supplyCategory.categoryName"/>
            <field name="units"       type="enum"     title="Units"       length="5">
                <valueMap>
                    <value>Roll</value>
                    <value>Ea</value>
                    <value>Pkt</value>
                    <value>Set</value>
                    <value>Tube</value>
                    <value>Pad</value>
                    <value>Ream</value>
                    <value>Tin</value>
                    <value>Bag</value>
                    <value>Ctn</value>
                    <value>Box</value>
                </valueMap>
            </field>
            <field name="unitCost"    type="float"    title="Unit Cost">
                <validators>
                    <validator type="required" dependentFields="category">
                        <applyWhen operator="and">
                            <criteria>
                                <criterion fieldName="category" operator="notEqual" value="Adding Machine/calculator Roll"/>
                            </criteria>
                        </applyWhen>
                    </validator>
                </validators>
            </field>
            <field name="inStock"   type="boolean"  title="In Stock"/>
            <field name="nextShipment"  type="date" title="Next Shipment"/>
        </fields>
    </DataSource>
    you may see that I've added a field:
    Code:
    <field name="nameSKU" type="text" customSelectExpression="supplyItem.itemName || ' ' || supplyItem.SKU"/>
    then, refresh the browser with the databoundDependentSelectsFS sample selected, and modify it:
    Code:
    isc.ListGrid.create({
        width: 500,
        height:200,
        canEdit:true,
        autoDraw: true,
        ID:"orderList",
        
        fields: [
           {name: "itemID", fetchMissingValues: false,
             editorProperties:{
                 optionDataSource:"supplyItem", 
                 valueField: "itemID", 
                 displayField: "nameSKU",
                 pickListWidth: 400,
                 pickListFields: [
                    {name: "itemID", width:"50"},
                    {name: "nameSKU"}
                 ],
                 pickListProperties: {showFilterEditor:true},
                 optionCriteria: {
                     _constructor: "AdvancedCriteria", operator: "and",
                     criteria: [
                         {
                           operator: "or",
                           criteria: [
                              {fieldName: "category", operator: "equals", value: "Accessories"}
                           ]
                         }
                     ]
                 },
             }
            }
            
        ]
    });
    
    isc.IButton.create({
        top: 235,
        autoFit: true,
        title:"Order New Item",
        click:"orderList.startEditingNew()"
    });
    then click the "Order New Item" button, open the pickList, then click in the filterEditor field: it will not receive focus on first click, you'll have to click a second time (first problem).

    then type something very rapidly, eventually you'll see that part of the already typed string will be deleted as if you pressed backspace (but actually I've only pressed character keys).

    you may see the effect in this video:

    https://www.youtube.com/watch?v=NWQc4RmHPRY

    #2
    The problem of typed characters which are deleted is reproducible also with 11.0 build:
    SmartClient Version: v11.0p_2017-02-23/Enterprise Development Only (built 2017-02-23)

    but 11.0 doesn't show the first problem:
    Originally posted by claudiobosticco View Post
    then click the "Order New Item" button, open the pickList, then click in the filterEditor field: it will not receive focus on first click, you'll have to click a second time (first problem).
    also, please note that the two validators in the dataSource aren't really needed to replicate the bug, you may use this simplified version:
    Code:
    <DataSource
        ID="supplyItem"
        serverType="sql"
        tableName="supplyItem"
        titleField="itemName"
        testFileName="/examples/shared/ds/test_data/supplyItem.data.xml"
        dbImportFileName="/examples/shared/ds/test_data/supplyItemLarge.data.xml"
    >
        <fields>
           <field name="nameSKU" type="text"
                   customSelectExpression="supplyItem.itemName || ' ' || supplyItem.SKU"/>
            <field name="itemID"      type="sequence" hidden="true"       primaryKey="true"/>
            <field name="itemName"    type="text"     title="Item"        length="128"       required="true"/>
            <field name="SKU"         type="text"     title="SKU"         length="10"        required="true"/>
            <field name="description" type="text"     title="Description" length="2000">
                
            </field>
            <field name="category"    type="text"     title="Category"    length="128"       required="true"
                   foreignKey="supplyCategory.categoryName"/>
            <field name="units"       type="enum"     title="Units"       length="5">
                <valueMap>
                    <value>Roll</value>
                    <value>Ea</value>
                    <value>Pkt</value>
                    <value>Set</value>
                    <value>Tube</value>
                    <value>Pad</value>
                    <value>Ream</value>
                    <value>Tin</value>
                    <value>Bag</value>
                    <value>Ctn</value>
                    <value>Box</value>
                </valueMap>
            </field>
            <field name="unitCost"    type="float"    title="Unit Cost">
                
            </field>
            <field name="inStock"   type="boolean"  title="In Stock"/>
            <field name="nextShipment"  type="date" title="Next Shipment"/>
        </fields>
    </DataSource>

    Comment


      #3
      Hello, any news on this bug?

      Comment


        #4
        Apologies for the delay - it's assigned but hasn't been looked into yet - we'll get to it within a day or so.

        Comment


          #5
          Hello, any news on this bug?

          Comment


            #6
            Slipped through the net again - we'll take a look today and get back to you

            Comment


              #7
              We're actually not reproducing either of these issues - is it possible there are any steps missing from your description?

              Comment


                #8
                SmartClient Version: SNAPSHOT_v11.1d_2017-03-23/Enterprise Development Only (built 2017-03-23)

                Chrome Version 57.0.2987.110 (64-bit)
                Safari 10.0.3 (12602.4.8)
                Firefox 51.0.1 (64 bit)
                Firefox 52.0.1 (64 bit)

                Hello, actually the first issue (two clicks to focus) is solved.

                I still see the 2nd issue.
                You have to type really fast, actually it isn't necessary to type something useful. Safari requires even faster typing than Chrome and Firefox.

                Comment


                  #9
                  Ah, we see this one now - we'll update when it's fixed.

                  Comment


                    #10
                    Hi Isomorphic,

                    this one might be related to this old bug of mine, which is also about rapidly typing in a ComboBoxItem.
                    (I did not manage to reproduce my old bug with SNAPSHOT_v11.1d_2017-03-27. Is it possible it got fixed in the meantime?).

                    Best regards
                    Blama

                    Comment


                      #11
                      Apologies for the lengthy gap in getting to this one - it's finally been nailed and will hit builds tomorrow. The problem was that a fetch was being correctly queued on the initial keyPress (because the textMatchStyle changes once you add a specific filter value) but further keyPresses were not resetting the fetchDelay - so the fetch was firing after 300ms and then selecting the value on it's return which, if the user was still typing, would clear the value.

                      Comment


                        #12
                        SmartClient Version: SNAPSHOT_v11.1d_2017-04-04/Enterprise Development Only (built 2017-04-04)

                        I can confirm it's fixed, thank you very much

                        Comment

                        Working...
                        X