Announcement

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

    MultiComboBoxItem fails removing selected option

    Hi there,

    Seems that the MultiComboBoxItem does fail removing options.
    We are adding after several actions in the view one item after another. The user can remove the items after they have been added.
    When removing an item there seems to be something wrong and only the its of the previous selected options are printed out.
    Click image for larger version

Name:	Animation 34.gif
Views:	76
Size:	156.3 KB
ID:	234498
    Reproducable with the latest nightly (SmartClient_v101p_2016-01-27_Pro) and current browsers

    Code for reproduction:
    Code:
    isc.Button.create({
        "ID" : "a",
        "click" : function () {
            theMultiComboBoxItem.setValueMap({
                1 : "AAA"
            });
            theMultiComboBoxItem.setValue([1]);
            theForm.markForRedraw();
        },
        "title" : "Action 1",
    });
    isc.Button.create({
        "ID" : "b",
        left : 100,
        "click" : function () {
            theMultiComboBoxItem.setValueMap({
                1 : "AAA",
                2 : "BBB"
            });
            theMultiComboBoxItem.setValue([2, 1]);
            theForm.markForRedraw();
        },
        "title" : "Action 2",
    });
    isc.Button.create({
        "ID" : "c",
        left : 200,
        "click" : function () {
            theMultiComboBoxItem.setValueMap({
                1 : "AAA",
                2 : "BBB",
                3 : "CCC"
            });
            theMultiComboBoxItem.setValue([3, 2, 1]);
            theForm.markForRedraw();
        },
        "title" : "Action 3",
    });
    isc.VLayout.create({
        "ID" : "theRootLayout",
        "hideUsingDisplayNone" : false,
        "leaveScrollbarGap" : false,
        top : 50,
        "members" :
        [
            isc.DynamicForm.create({
                "ID" : "theForm",
                "width" : "100%",
                "padding" : 4,
                "hideUsingDisplayNone" : false,
                "autoFocus" : true,
                "selectOnFocus" : true,
                "validateOnExit" : true,
                "saveOnEnter" : true,
                "readOnlyDisplay" : "static",
                "fields" :
                [{
                        "ID" : "theMultiComboBoxItem",
                        "name" : "theMultiComboBoxItem",
                        "title" : "Liste",
                        "editorType" : "MultiComboBoxItem",
                        "showTitle" : true,
                        "width" : 200,
                        "height" : 3,
                        "iconWidth" : 16,
                        "iconHeight" : 16,
                        "readOnlyDisplay" : "static",
                        "layoutStyle" : "verticalReverse",
                        "comboBoxProperties" : {
                            "type" : "text",
                            "editorType" : "comboBox",
                            "height" : 0,
                            "iconWidth" : 16,
                            "iconHeight" : 16,
                            "visible" : true,
                            "readOnlyDisplay" : "static",
                            "textMatchStyle" : "substring",
                            "allowEmptyValue" : true
                        },
                        "valueMap" : {}
                    }
                ],
                "values" : {
                    "theMultiComboBoxItem" : []
                }
            })
        ]
    })
    Regards

    #2
    Hello SimonF,

    We could indeed reproduce this, thanks for the test case. We've not yet tracked down the cause of the issue but we've found that if you remove the below variable initialisation from the MultiComboBoxItem's declaration everything seems to work fine.

    Code:
    "valueMap": {}
    Hopefully this is ok as a work around for you right now as we investigate further into what is causing this strange behaviour.

    Regards,
    Isomorphic Software

    Comment


      #3
      Thanks for the response.
      This does indeed fixes the error for the provided example.
      Our real usage of this MultiComboBoxItem is in a quite larger scale, so I only tried to encapsulate the problem. However removing the valueMap does not fix the issue in our real usage of the MultiComboBoxItem. I cannot reproduce this by the small example, because this si quite time consuming reproducing every action so that this bug shows up.
      I also have tested this with the latest sc-version (SmartClient_v101p_2016-01-31_Pro), but this does also does have the same bug in our real usage form.
      I hope there will be a solution soon.

      Regards
      Simon

      Comment


        #4
        Hi,
        I was able to reproduce again with the latest downloadable version(SmartClient_v101p_2016-02-02_Pro).
        The bug seems to be if there is any valueMap at the beginning. In our use-case we need a given valueMap at the beginning, so we cannot set an empty valueMap at the beginning.
        Is there any solution in sight or a usable workaround?

        Here again a liveshow for the bug:

        Click image for larger version

Name:	Animation 36.gif
Views:	88
Size:	403.0 KB
ID:	234604


        Code for reproduction:
        Code:
        isc.Button.create({
            "ID" : "a",
            "click" : function () {
                theMultiComboBoxItem.setValueMap({
                    1 : "AAA",
                    2 : "BBB",
                    3 : "CCC",
                    4 : "DDD",
                    5 : "EEE",
                });
                theMultiComboBoxItem.setValue([5])
                theForm.markForRedraw()
            },
            "title" : "Action 1",
        });
        isc.Button.create({
            "ID" : "b",
            left : 100,
            "click" : function () {
                theMultiComboBoxItem.setValueMap({
                    1 : "AAA",
                    2 : "BBB",
                    3 : "CCC",
                    4 : "DDD",
                    5 : "EEE",
                    6 : "FFF"
                });
                theMultiComboBoxItem.setValue([6, 5]);
                theForm.markForRedraw();
            },
            "title" : "Action 2",
        });
        isc.VLayout.create({
            "ID" : "theRootLayout",
            "hideUsingDisplayNone" : false,
            "leaveScrollbarGap" : false,
            "top" : 50,
            "members" :
            [
                isc.DynamicForm.create({
                    "ID" : "theForm",
                    "width" : "100%",
                    "padding" : 4,
                    "hideUsingDisplayNone" : false,
                    "autoFocus" : true,
                    "selectOnFocus" : true,
                    "validateOnExit" : true,
                    "saveOnEnter" : true,
                    "readOnlyDisplay" : "static",
                    "fields" :
                    [{
                            "ID" : "theMultiComboBoxItem",
                            "name" : "theMultiComboBoxItem",
                            "title" : "Places",
                            "editorType" : "MultiComboBoxItem",
                            "showTitle" : true,
                            "width" : 200,
                            "readOnlyDisplay" : "static",
                            "layoutStyle" : "verticalReverse",
                            "comboBoxProperties" : {
                                "type" : "text",
                                "editorType" : "comboBox",
                                "iconWidth" : 16,
                                "iconHeight" : 16,
                                "visible" : true,
                                "readOnlyDisplay" : "static",
                                "textMatchStyle" : "substring",
                                "allowEmptyValue" : true
                            },
                            "valueMap" : {
                                1 : "AAA",
                                2 : "BBB",
                                3 : "CCC",
                                4 : "DDD"
                            }
                        }
                    ],
                    "values" : {
                        "theMultiComboBoxItem" : [],
                    }
                })
            ]
        })
        Regards

        Comment


          #5
          Just checked again with the latest version SmartClient_v101p_2016-02-03_Pro.
          Issue still does exist with the same output and the same console outputs.

          Regards
          Last edited by SimonF; 3 Feb 2016, 06:06.

          Comment


            #6
            So there's been three days since the last response; the problem still exists.
            Is there any fix in sight?

            Comment


              #7
              We are still working on a fix. We don't need any further input right now.

              Comment


                #8
                Hello SimonF,

                We've now put in a fix for this issue. Please check a nightly build in the next day or so.

                Regards,
                Isomorphic Software

                Comment

                Working...
                X