Announcement

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

    ComboBoxItem Selection Bug

    Hello,

    I believe I found a bug with the ComboBoxItem.

    When using the mouse to select or tabbing to the next field (if applicable), it works. When using the filter (type ahead) feature to select a value and hitting "ENTER", the class `com.smartgwt.client.util.SC` is not fired.

    Sample Code
    Code:
    final DynamicForm testForm = new DynamicForm();
    final ComboBoxItem testField = new ComboBoxItem();
    testField.setValueMap("value 1", "value 2", "value 3");
    testForm.setFields(testField); testForm.draw();
    testField.addChangedHandler(event -> {
       if (event.getItem().getValue().equals("value 2")) {
          SC.say("you selected value 2");
       }
    });
    Please let me know if there is anything else you might need.

    #2
    See completeOnEnter / completeOnTab. You may have set these globally (invalidly) or your ComboBox could be embedded in a search form.

    If you still think you've found a framework problem:

    1. give the full version and edition of the product you are using, and make sure you have tested with the latest patched version (always required)

    2. test in a standalone test case, separate from your application project, to avoid issues like global customizations, third-party libraries, or CSS customizations affecting your test case (always required)

    Comment


      #3
      Still am having issues.

      1. Version being used: 12.1-p20220107 enterprise

      2. Still saw the error on standalone test case.

      Comment


        #4
        Not reproducible, as expected (if this error were really occurring, these forums would be flooded with reports of a problem).

        You may be confused in your testing, because you are using SC.say() to display the value, taking focus away from the field. Always use logging instead.

        Also, if you type in "value 2", then hit Enter, the value will have become "value 2" before you press Enter. You will not receive an additional "changed" notification because, when you hit Enter, the value has not changed.

        Comment


          #5
          Did you even test it with the SC.say()? That is what is failing.

          The changedHandler is working fine, and the value is correct. Only in this scenario does the SC.say() not work.

          Did you test the SC.say()? or just log?

          Comment


            #6
            We tested both, and both work as expected.

            Your team now has a streak going of unreproducible bugs regarding the comboBox. You probably have some kind of invalid framework hack applied in your environment, maybe in your skin, which is causing these issues, and although you think you are testing in a clean environment, you must not be.

            Please don't post further "bugs" until you figure this out.

            Comment

            Working...
            X