Announcement

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

    ComboBoxItem - backspace doesn't clear filter.

    Using SmartClient Version: v9.1p_2015-05-21/PowerEdition Deployment (built 2015-05-21)

    We have a ComboBox defined like so:
    Code:
    isc.defineClass("TestItem","ComboBoxItem").addProperties({
    	valueField:"TEST_ID",
    	optionDataSource: "TESTS",
    	optionOperationId:'picklist',
    	displayField:"TEST_NAME",
    	addUnknownValues: false,
     	pickListWidth: 600,
    	loadingDisplayValue:'',
    	pickListProperties: {
    		autoFitFieldWidths: true,
    		autoFitWidthApproach: "both",
    		showFilterEditor:true
    	}
            pickListFields: [
               {name:"TEST_NAME"},
               {name:"START_DATE"},
               {name:"END_DATE"},
               {name:"REQUIRED")
            ]
    });
    When we open the combo box and type "A", the values in the combo box are filtered properly. However, when we hit backspace and remove "A", the combobox does not remove the "A" filter, so all options are not visible again. The "A" is removed from the combo box, but not the filter editor for the TEST_NAME column. To regain the complete list, the user has to manually remove the value from the TEST_NAME filter, or close and re-open the ComboBox.

    #2
    showFilterEditor:true is not supported for the ComboBox because there are cases where it would create an ambiguous UI - this is covered in the docs.

    It is, however, be possible to sponsor support for this - in order to avoid issues for users it requires several behavior changes in the ComboBox, so this would be a new, top-level property on ComboBox.

    Comment


      #3
      Please point me to where this is documented in SmartClient 9.1.

      It does not appear to be documented here:
      http://www.smartclient.com/docs/9.1/a/b/c/go.html#search=showFilterEditor

      And on this page: http://www.smartclient.com/docs/9.1/a/b/c/go.html#attr..ComboBoxItem.pickListProperties

      It says:
      "... Also note that while setting ListGrid.showFilterEditor is a valid way to create a filterable pickList, this setting is not supported on a SelectItem with SelectItem.multiple set to true - this combination of settings can cause a selected value to be filtered out of view at which point further selection changes will discard that value."...

      This implies that it should be perfectly valid, as we're using a ComboBoxItem, and not a SelectItem (and especially not a SelectItem with multiple set to true).

      Comment


        #4
        What that doc means is that showFilterEditor is valid for a non-multiple SelectItem. It does not say that it *is* valid for ComboBoxItem. We've since clarified the docs to explicitly cover the ComboBoxItem case.

        Whether the docs are explicit or implicit, again the underlying reason is user experience. You're complaining rightly that the *normal behavior of the filterEditor* is not intuitive when used as a pickList setting. To implement a correct interaction between these features, the comboBox needs to do several things differently, including forcing the pickList open on focus so that all criteria entered in the filterEditor are visible to the user, auto-clearing criteria in the pickList in various circumstances (eg tab completion), and some other behavior changes related to completeOnTab and addUnknownValues modes.

        Finally, even with this feature fully implemented as described, there is no meaningful way to make it accessibility-compliant, so the docs would warn people away for that reason.

        So yes, the old docs weren't quite explicit, sorry about that, but there are several reasons this setting won't work unless we add it as a distinct feature involving a number of behavior changes - and that feature can be sponsored if you want it.

        Comment


          #5
          Ok, so this is supported on a SelectItem, where you can't type, but not on a ComboBoxItem, where you can. I can understand the technical limitations and complexities involved in supporting this.

          Comment


            #6
            Right. It's the simultaneous use of two kinds of filtering, especially the ability to type and quickly tab out (possibly never even seeing the pickList) that create the user experience issue. The SelectItem doesn't have corresponding issues, so it's supported there.

            Except for multiple SelectItems: you can't uncheck what you can't see and it would be terrible UI to force the user to hunt down items in order to de-select them. There again, a feature could be added to do something like display selected items separately, which would make this a viable mode.

            Comment


              #7
              So I removed the showFilterEditor:true from the TestItem definition.

              The filter editor row is gone.

              I'm still not getting the desired behavior. If I type "A", then backspace it, the values from the "A" filter are the only ones visible. The picklist doesn't change unless I enter a new value or close and reopen the drop-down.

              Comment


                #8
                On this:
                'm still not getting the desired behavior. If I type "A", then backspace it, the values from the "A" filter are the only ones visible. The picklist doesn't change unless I enter a new value or close and reopen the drop-down.
                Could you confirm which build you're seeing this issue with? We've recently fixed some issues in this area in the 10.0 / 10.1 branches. If you're on an older build, please try the latest nightly build. If you are working against an older branch and upgrading isn't an option for you, let us know and we'll take a look at whether we need to backport some logic, etc

                Thanks
                Isomorphic Software

                Comment


                  #9
                  We're currently on v9.1p_2015-05-21/PowerEdition Deployment (built 2015-05-21) upgrading to 10 isn't an option at the moment.

                  Comment


                    #10
                    Ok we'll get this fixed for you in 9.1 and follow up when we've got it in.

                    Comment


                      #11
                      This is now fixed. Please try the next nightly build (May 27).

                      As an aside - you'll note that when you clear the element value, the pickList is actually hidden rather than re-filtering to show all available options. This is the intended behavior and matches addUnknownValues:true pickLists. (It also matches standard "combo-box" type behavior - for example, the browser URL bar behavior when you clear the entered value).

                      Regards
                      Isomorphic Software

                      Comment

                      Working...
                      X