Announcement

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

    unexpected horizontal scroll when filtering a dropdown grid with selectionAppearance:"checkbox"

    SmartClient Version: v12.1p_2021-04-08/AllModules Development Only (built 2021-04-08)

    Chrome on MacOS

    Hello, please modify the dropdownGrid sample like this:

    Code:
    isc.DynamicForm.create({
        ID:"exampleForm",
        width:300,
        fields: [
            {
                name:"itemID",
                type:"select",
                width:200,
                title:"Item",
                optionDataSource:"supplyItem",
                //multiple:true,
                valueField:"SKU",
                displayField:"itemName",
                pickListWidth:100,
                pickListProperties:{
                    selectionAppearance:"checkbox",
                    showFilterEditor:true,
                    showHeader:false
                },
                pickListFields: [
                    { name: "itemName" },
                    { name: "units" },
                    { name: "unitCost" }
                ]
            }
        ]
    });
    then filter by itemName, ie type "a", you'll see an horizontal scroll as in the following screenshot:
    Click image for larger version  Name:	2021-04-08 18.21.46.jpg Views:	0 Size:	62.3 KB ID:	265155

    I know that this makes sense only with multiple:true, which isn't supported with showFilterEditor, but this horizontal scroll could indeed be a subtle bug?
    Last edited by claudiobosticco; 8th Apr 2021, 08:27.

    #2
    Hi Claudio
    Sorry for the delay responding to this one.
    This usage revealed a couple of oddities / minor bugs, both of which are resolved as of the next nightly build (April 20 or above, 12.1 and 13.0 branches).

    Without going into too much detail, you actually *should* be seeing a horizontal scrollbar when the pickList is first shown with the configuration you have.

    What should be happening is that fields within the pickList are auto-fitting to their values, and the pickList itself is expand to accomodate those wider fields - up to the specified pickListMaxWidth, at which point horizontal scrollbars are introduced.

    It so happens that with this sample dataSource's data set and the fields you have included [plus the checkbox-field], the content slightly overflows that maximum, requiring the horizontal scrollbar.
    So the fact this wasn't initially showing up was actually a bug.

    Once you type, the filtered data-set changes, and the required horizontal space may change. So if you enter "glue", say, you may see no hscrollbar at all.

    If you want to suppress this behavior entirely, you could specify explicit widths on the pickList fields, and use pickListProperties to set 'autoFitWidths' to false.


    Regards
    Isomorphic Software

    Comment

    Working...
    X